/* ezmesh.ai.kr - page1.css (landing page)
   Section styles follow ezauto.ai.kr page1.css; ezmesh-only parts are the
   screenshot frames, feature tabs, tables, start cards, <details> FAQ and the
   lightbox. */

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  padding: var(--space-4xl) 0;
  color: var(--color-text);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(210, 0, 1, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(210, 0, 1, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: var(--space-3xl);
  align-items: center;
}

.hero-text {
  animation: fadeInUp 0.6s ease-out both;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-h2);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
  line-height: 1.3;
}

.hero-identity {
  font-size: var(--text-body);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
  font-weight: 400;
}

.hero-headline {
  color: var(--color-text);
  margin-bottom: var(--space-lg);
}

.hero-cta-group {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}

.hero-cta-sub {
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
  margin: 0;
}

.hero-visual {
  animation: slideInRight 0.6s ease-out 0.2s both;
  min-width: 0;
}

.hero-figure {
  margin: 0;
}

.hero-caption {
  margin-top: var(--space-xs);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  text-align: right;
}

/* Browser-window frame (ezauto "hero-dashboard" mockup) around real screenshots */
.hero-dashboard,
.browser-frame {
  background: #1e293b;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
}

.browser-frame {
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}

.dash-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #0f172a;
}

.dash-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #334155;
  flex-shrink: 0;
}

.dash-dot:first-child { background: #ef4444; }
.dash-dot:nth-child(2) { background: #eab308; }
.dash-dot:nth-child(3) { background: #22c55e; }

.dash-title {
  margin-left: 8px;
  font-size: 11px;
  color: #94a3b8;
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zoom {
  display: block;
  cursor: zoom-in;
  background: #fff;
}

.zoom img {
  width: 100%;
}

/* The frame clips overflow, so draw the focus ring inside the link */
.hero-dashboard .zoom:focus-visible,
.browser-frame .zoom:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: -3px;
}

/* ===== SOCIAL PROOF (numbers) ===== */
.social-proof {
  padding: var(--space-section) 0;
  background: var(--color-bg);
}

.proof-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  text-align: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.proof-stat {
  padding: var(--space-lg) var(--space-sm);
}

.proof-stat-num {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--color-primary);
  font-family: var(--font-mono);
  line-height: 1;
}

.proof-stat-suffix {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--color-primary);
}

.proof-stat-desc {
  display: block;
  margin-top: var(--space-xs);
  font-size: var(--text-caption);
  color: var(--color-text);
  font-weight: 600;
  line-height: 1.4;
}

.proof-stat-desc small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-secondary);
  margin-top: 4px;
}

/* ===== TECH TRUST STRIP ===== */
.tech-trust {
  padding: var(--space-xl) 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.trust-strip {
  display: flex;
  justify-content: center;
  gap: var(--space-3xl);
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.trust-item svg {
  flex-shrink: 0;
  color: var(--color-accent);
}

.trust-item strong {
  display: block;
  font-size: var(--text-caption);
  color: var(--color-text);
}

.trust-item span {
  font-size: 12px;
  color: var(--color-text-secondary);
}

/* ===== PRINCIPLE (ezauto "outcomes" rows) ===== */
.outcomes {
  padding: var(--space-section) 0;
  background: var(--color-bg);
}

.outcome-list {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  list-style: none;
  padding: 0;
}

.outcome-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-md);
  align-items: center;
  padding: var(--space-md);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.outcome-before,
.outcome-after {
  padding: var(--space-sm);
}

.outcome-before p,
.outcome-after p {
  margin: 0;
}

.outcome-before p {
  color: var(--color-text);
  font-weight: 600;
}

.outcome-after p {
  font-size: var(--text-caption);
}

.outcome-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: var(--space-xs);
}

.outcome-tag.rule {
  background: rgba(210, 0, 1, 0.08);
  color: var(--color-accent);
}

.outcome-tag.how {
  background: rgba(40, 167, 69, 0.1);
  color: #1e7e34;
}

.outcome-arrow {
  color: var(--color-accent);
  display: flex;
  align-items: center;
}

/* ===== FEATURES (ezauto "integration" section) ===== */
.integration {
  padding: var(--space-section) 0;
  background: var(--color-surface);
  position: relative;
}

/* Feature map: four rhythms (benefit-item cards) */
.flow-map {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.benefit-item {
  padding: var(--space-md);
  border-radius: var(--radius);
  background: #fff;
  border-top: 3px solid var(--color-accent);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.benefit-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.benefit-item svg {
  display: block;
  margin-bottom: var(--space-sm);
  color: var(--color-accent);
}

.flow-when {
  font-size: var(--text-caption);
  font-weight: 700;
  color: var(--color-callout);
  margin-bottom: 2px;
}

.benefit-item h3 {
  font-size: 1.375rem;
  margin-bottom: var(--space-sm);
}

.flow-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.flow-links li {
  border-top: 1px solid var(--color-border);
}

.flow-links a,
.flow-links a:visited {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 6px 0;
  color: var(--color-text);
  font-size: 0.9375rem;
}

.flow-links a::after {
  content: '\2192';
  color: var(--color-accent);
  transition: transform var(--transition-fast);
}

.flow-links a:hover {
  color: var(--color-accent);
}

.flow-links a:hover::after {
  transform: translateX(3px);
}

.flow-note {
  text-align: center;
  font-size: var(--text-caption);
  max-width: 760px;
  margin: var(--space-lg) auto 0;
}

/* Feature tabs (WAI-ARIA; hidden without JS, then every panel is shown) */
.feature-detail {
  margin-top: var(--space-3xl);
}

.feature-detail-intro {
  text-align: center;
  font-size: var(--text-caption);
  margin-bottom: var(--space-md);
}

.feature-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-xl);
}

.no-js .feature-tabs {
  display: none;
}

.feature-tab {
  font-family: var(--font-family);
  font-size: 0.9375rem;
  font-weight: 600;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.feature-tab:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.feature-tab[aria-selected="true"] {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.feature-panel + .feature-panel {
  margin-top: var(--space-xl);
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--space-xl);
  align-items: start;
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--color-border);
}

.feature-panel .feature-row:first-child,
.feature-row.first {
  border-top: 0;
  padding-top: 0;
}

.feature-text {
  min-width: 0;
}

.feature-kicker {
  font-size: var(--text-caption);
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 4px;
}

.feature-row h3,
.start-card h3 {
  font-size: 1.375rem;
  margin-bottom: var(--space-md);
}

.feature-shot {
  min-width: 0;
}

/* Numbered callouts - same teal circles as in the console screenshots */
.callouts {
  counter-reset: callout;
  list-style: none;
  margin: 0 0 var(--space-sm);
  padding: 0;
}

.callouts li {
  counter-increment: callout;
  position: relative;
  padding: 0 0 14px 42px;
  min-height: 28px;
}

.callouts li::before {
  content: counter(callout);
  position: absolute;
  left: 0;
  top: 1px;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 14px;
  background: var(--color-callout);
  color: #fff;
  font-size: var(--text-caption);
  font-weight: 700;
  line-height: 28px;
  text-align: center;
}

/* Screenshot numbers that are ranges ("1–3") */
.callouts li[data-n]::before {
  content: attr(data-n);
}

.callouts.wide-marks li {
  padding-left: 56px;
}

.callouts strong {
  display: block;
  color: var(--color-text);
}

.point {
  font-size: 0.9375rem;
  background: var(--color-surface);
  border-left: 3px solid var(--color-accent);
  padding: 10px 14px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.integration .point {
  background: #fff;
}

.point:last-child {
  margin-bottom: 0;
}

/* ===== OUTPUTS / CHECKLIST TABLES ===== */
.outputs {
  padding: var(--space-section) 0;
  background: var(--color-bg);
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
}

.data-table {
  width: 100%;
  min-width: 640px;
  font-size: 0.9375rem;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--color-border);
}

.data-table thead th {
  background: var(--color-text);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}

.data-table tbody th {
  color: var(--color-text);
  font-weight: 600;
}

.data-table tbody tr:last-child > * {
  border-bottom: 0;
}

.data-table tbody tr:nth-child(even) {
  background: #fbfbfc;
}

.data-table .num {
  width: 48px;
  color: var(--color-accent);
  font-weight: 700;
  font-family: var(--font-mono);
}

.table-note {
  text-align: center;
  font-size: var(--text-caption);
  max-width: 760px;
  margin: var(--space-md) auto 0;
}

/* ===== START ===== */
.start-section {
  padding: var(--space-section) 0;
  background: var(--color-surface);
}

.start-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.start-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  min-width: 0;
}

.start-card .browser-frame {
  margin-bottom: var(--space-md);
}

.start-card h3 {
  font-size: 1.125rem;
  margin-bottom: var(--space-sm);
}

/* ===== FAQ (<details>) ===== */
.faq-section {
  padding: var(--space-section) 0;
  background: var(--color-bg);
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: var(--space-sm);
  overflow: hidden;
  background: #fff;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: 44px;
  padding: var(--space-sm) var(--space-md);
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  border-left: 3px solid transparent;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '';
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transition: transform var(--transition-base);
}

.faq-item summary:hover {
  color: var(--color-primary);
}

.faq-item summary:focus-visible {
  outline-offset: -3px;
}

.faq-item[open] summary {
  background: var(--color-surface);
  color: var(--color-primary);
  border-left-color: var(--color-accent);
}

.faq-item[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.faq-body {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  padding: var(--space-sm) var(--space-md);
}

.faq-body p:last-child {
  margin-bottom: 0;
}

.checklist {
  margin-top: var(--space-3xl);
}

.checklist-title {
  text-align: center;
  margin-bottom: var(--space-xs);
}

.checklist-desc {
  text-align: center;
  font-size: var(--text-caption);
  margin-bottom: var(--space-md);
}

/* ===== CONTACT ===== */
.contact-section {
  padding: var(--space-section) 0;
  background: var(--color-surface);
  text-align: center;
}

.contact-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.contact-mailto {
  gap: var(--space-xs);
  padding: 16px 40px;
  font-size: 1.1rem;
}

.contact-phone {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-text-secondary);
  font-size: var(--text-body);
}

.contact-phone a,
.contact-phone a:visited {
  color: var(--color-text);
  font-weight: 600;
}

.contact-note {
  max-width: 560px;
  margin: 0;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-caption);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.contact-note strong {
  color: var(--color-text);
}

/* ===== BOTTOM CTA ===== */
.bottom-cta {
  background: var(--color-text);
  padding: var(--space-3xl) 0;
  text-align: center;
  color: #fff;
}

.bottom-cta h2 {
  color: #fff;
  margin-bottom: var(--space-sm);
}

.bottom-cta p {
  opacity: 0.85;
  margin-bottom: var(--space-lg);
}

.bottom-cta :focus-visible {
  outline-color: #fff;
}

.bottom-cta-buttons {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== FOOTER GRID ===== */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
}

.footer-brand p {
  margin-top: var(--space-sm);
  font-size: var(--text-caption);
}

/* images/ezmesh-logo.png keeps the red arches on dark backgrounds;
   its canvas has ~7% side padding, hence the negative margin. */
.footer-brand .footer-logo {
  height: 40px;
  width: auto;
  margin-left: -11px;
}

/* ===== LIGHTBOX (<dialog>) ===== */
.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 96vw;
  max-height: 96vh;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.85);
}

.lightbox-figure {
  margin: 0;
}

.lightbox img {
  max-width: 96vw;
  max-height: 86vh;
  width: auto;
  border-radius: var(--radius);
  background: #fff;
}

.lightbox-caption {
  color: #eee;
  font-size: var(--text-caption);
  text-align: center;
  margin: var(--space-xs) 0 0;
}

.lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: var(--color-text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.lightbox-close:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* ===== DEMO NOTICE MODAL (ezauto modal-under-development) ===== */
.demo-modal {
  border: 0;
  border-radius: 16px;
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  width: min(420px, calc(100vw - 32px));
  text-align: center;
  color: var(--color-text);
  background: var(--color-bg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.demo-modal::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.demo-modal-logo {
  height: 26px;
  width: auto;
  margin: 0 auto var(--space-sm);
}

.demo-modal-icon {
  display: inline-flex;
  padding: var(--space-sm);
  margin-bottom: var(--space-sm);
  border-radius: 50%;
  color: #b7791f;
  background: rgba(255, 193, 7, 0.12);
}

.demo-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 var(--space-sm);
}

.demo-modal p {
  margin: 0 0 var(--space-xs);
  line-height: 1.6;
}

.demo-modal .demo-modal-sub {
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

.demo-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.demo-modal-close:hover {
  background: var(--color-surface);
}

.demo-modal-close:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.demo-modal-ok {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

/* ===== RESPONSIVE ===== */

/* Tablet (768-1023) */
@media (max-width: 1023.98px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .hero-visual {
    max-width: 720px;
  }

  .proof-stats {
    gap: var(--space-sm);
  }

  .trust-strip {
    gap: var(--space-xl);
  }

  .flow-map {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-row {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }
}

/* Mobile (<768) */
@media (max-width: 767.98px) {
  .hero {
    padding: var(--space-xl) 0;
  }

  .hero-headline {
    font-size: clamp(2rem, 6vw, 2.5rem);
  }

  .hero-cta-group {
    flex-direction: column;
  }

  .hero-cta-group .btn-primary-cta,
  .hero-cta-group .btn-secondary-cta {
    width: 100%;
    justify-content: center;
  }

  .hero-caption {
    text-align: left;
  }

  .proof-stats {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .proof-stat {
    padding: var(--space-md) var(--space-sm);
    border-bottom: 1px solid var(--color-border);
  }

  .proof-stat:last-child {
    border-bottom: none;
  }

  .trust-strip {
    flex-direction: column;
    gap: var(--space-md);
    align-items: flex-start;
    padding: 0 var(--space-xs);
  }

  .outcome-row {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
    padding: var(--space-sm);
  }

  .outcome-arrow {
    justify-content: center;
    transform: rotate(90deg);
  }

  .feature-detail {
    margin-top: var(--space-xl);
  }

  .feature-tabs {
    justify-content: flex-start;
  }

  .feature-tab {
    padding: 8px 16px;
  }

  .start-grid {
    grid-template-columns: 1fr;
  }

  .start-card {
    padding: var(--space-sm);
  }

  .contact-mailto {
    width: 100%;
    padding: 16px 24px;
  }

  .bottom-cta-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .footer {
    padding-top: var(--space-xl);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .lightbox-close {
    top: 4px;
    right: 4px;
  }
}

/* Small mobile (360-575) */
@media (max-width: 575.98px) {
  .flow-map {
    gap: 12px;
  }

  .flow-map .benefit-item {
    padding: var(--space-sm);
  }

  .flow-map .benefit-item h3 {
    font-size: 1.125rem;
  }

  .flow-links a,
  .flow-links a:visited {
    font-size: var(--text-caption);
  }

  .faq-item summary {
    padding: var(--space-sm);
  }

  .faq-body {
    padding: var(--space-sm);
  }
}

@media (max-width: 400px) {
  .hero {
    padding: var(--space-lg) 0;
  }

  .hero-brand {
    font-size: 1.75rem;
  }
}

/* Wide desktop (1440+) */
@media (min-width: 1440px) {
  .hero {
    padding: var(--space-4xl) 0 120px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .benefit-item:hover,
  .flow-links a:hover::after {
    transform: none;
  }
}
