/* ===========================================
   NEXTCORNER — MARKETING SITE
   =========================================== */

/* --- Custom Properties --- */
:root {
  --cream:       #F6F1E7;
  --cream-2:     #EDE8DC;
  --cream-3:     #E0D9CC;
  --dark:        #2B2722;
  --accent:      #7A4A2A;
  --accent-light:#9A6040;
  --muted:       #6E665A;
  --muted-light: #9A8E80;
  --white:       #FFFFFF;
  --phone-bg:    #1C1C1E;
  --phone-edge:  #2E2E30;

  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --nav-h:     72px;
  --max-w:     1300px;
  --gutter:    clamp(24px, 5vw, 88px);
  --sec-pad:   clamp(80px, 11vw, 150px);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body  {
  background: var(--cream);
  color: var(--dark);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a     { text-decoration: none; color: inherit; }
ul    { list-style: none; }
img, svg { display: block; max-width: 100%; }
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }

/* --- Shared Typography Helpers --- */
.label {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  display: block;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

h1 em, h2 em { font-style: italic; color: var(--accent); }

/* ===========================================
   NAVIGATION
   =========================================== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  height: var(--nav-h);
  transition: background 0.35s, backdrop-filter 0.35s, box-shadow 0.35s;
}
.nav.scrolled {
  background: rgba(242, 232, 212, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 1px 0 rgba(26,16,7,0.07);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}
.nav-links a {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--dark); }
.nav-cta {
  font-size: 13px;
  font-weight: 500;
  color: var(--cream);
  background: var(--accent);
  padding: 10px 22px;
  border-radius: 100px;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--accent-light); transform: translateY(-1px); }

/* ===========================================
   APP STORE BUTTONS
   =========================================== */
.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--dark);
  color: var(--white);
  padding: 13px 22px;
  border-radius: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}
.btn-store:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(26,16,7,0.22);
}
.btn-store-secondary {
  background: transparent;
  color: var(--dark);
  box-shadow: inset 0 0 0 1.5px var(--dark);
}
.btn-store-secondary:hover {
  box-shadow: inset 0 0 0 1.5px var(--dark), 0 12px 32px rgba(26,16,7,0.1);
  background: rgba(26,16,7,0.03);
}
.btn-store-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.btn-store-sub  { font-size: 10px; font-weight: 400; opacity: 0.65; line-height: 1.2; }
.btn-store-main { font-size: 16px; font-weight: 600; line-height: 1.25; }

/* ===========================================
   HERO
   =========================================== */
.hero {
  min-height: 100svh;
  padding-top: var(--nav-h);
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 70% 45%, rgba(123,49,24,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px var(--gutter) 72px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  width: 100%;
}
.hero-text { max-width: 580px; }

.hero-title {
  font-size: clamp(54px, 6.5vw, 100px);
  font-weight: 300;
  line-height: 1.0;
  margin-bottom: 28px;
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
  font-weight: 300;
  margin-bottom: 36px;
  max-width: 430px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 44px;
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
}
.stat-label { font-size: 12px; color: var(--muted); }
.stat-div   { width: 1px; height: 32px; background: var(--cream-3); flex-shrink: 0; }

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* Hero phone */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* ===========================================
   SCREENSHOTS
   =========================================== */
.screen-img {
  width: 100%;
  height: auto;
  display: block;
}
.feature-phone .screen-img { max-width: 360px; }

@keyframes phoneFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-18px); }
}

/* ===========================================
   HERO VIDEO FRAME
   =========================================== */
.video-frame {
  width: 100%;
  max-width: 360px;
  border-radius: 24px;
  overflow: hidden;
  border: 1.5px solid rgba(26,16,7,0.12);
  box-shadow: 0 32px 80px rgba(26,16,7,0.22), 0 6px 20px rgba(26,16,7,0.10);
  margin: 0 auto;
  animation: phoneFloat 7s ease-in-out infinite;
  position: relative;
}
.hero-video {
  width: 100%;
  height: auto;
  display: block;
}
.video-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: opacity 0.25s;
}
.video-play-btn svg {
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.25));
  transition: transform 0.2s;
}
.video-play-btn:hover svg { transform: scale(1.08); }
.video-play-btn.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ===========================================
   FEATURE SECTIONS
   =========================================== */
.feature-section {
  padding: var(--sec-pad) 0;
}
.feature-alt {
  background: var(--cream-2);
}

.feature-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

/* Reverse: phone first on desktop */
.feature-rev .feature-phone { order: -1; }

.feature-title {
  font-size: clamp(36px, 4vw, 58px);
  margin-bottom: 22px;
}
.feature-desc {
  font-size: 17px;
  line-height: 1.72;
  color: var(--muted);
  font-weight: 300;
  margin-bottom: 30px;
  max-width: 460px;
}
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.feature-list li {
  font-size: 15px;
  color: var(--dark);
  padding-left: 22px;
  position: relative;
  line-height: 1.5;
}
.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.65;
}

.feature-phone { display: flex; justify-content: center; }

/* ===========================================
   THREE WAYS SECTION
   =========================================== */
.ways-section {
  padding: var(--sec-pad) 0;
  background: var(--dark);
}
.ways-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.ways-title {
  font-size: clamp(42px, 5.5vw, 76px);
  color: white;
  margin-bottom: 64px;
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.ways-title em { color: var(--accent-light); }

.ways-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  max-width: 960px;
  margin: 0 auto;
}
.way-card {
  padding: 48px 36px;
  background: rgba(255,255,255,0.04);
  transition: background 0.25s;
}
.way-card:first-child { border-radius: 16px 0 0 16px; }
.way-card:last-child  { border-radius: 0 16px 16px 0; }
.way-card:hover       { background: rgba(255,255,255,0.07); }
.way-active           { background: var(--accent) !important; }
.way-active:hover     { background: var(--accent-light) !important; }

.way-icon {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 26px;
}
.way-icon-active { background: rgba(255,255,255,0.22); }

.way-name {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  color: white;
  margin-bottom: 10px;
}
.way-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.58);
  line-height: 1.55;
}

/* ===========================================
   CITIES SECTION
   =========================================== */
.cities-section {
  padding: var(--sec-pad) 0;
  overflow: hidden;
}
.cities-header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  margin-bottom: 48px;
}
.cities-title {
  font-size: clamp(40px, 5vw, 70px);
  max-width: 700px;
}
.cities-scroll-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 var(--gutter) 8px;
  scrollbar-width: none;
  cursor: grab;
}
.cities-scroll-wrap::-webkit-scrollbar { display: none; }
.cities-scroll-wrap.dragging { cursor: grabbing; user-select: none; }
.cities-scroll {
  display: flex;
  gap: 10px;
  width: max-content;
}
.city-chip {
  padding: 13px 26px;
  border-radius: 100px;
  border: 1.5px solid var(--cream-3);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
  color: var(--dark);
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  cursor: pointer;
}
.city-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(123,49,24,0.04);
}

/* ===========================================
   FAQ SECTION
   =========================================== */
.faq-section {
  padding: var(--sec-pad) 0;
  background: var(--cream-2);
}
.faq-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.faq-head {
  text-align: center;
  margin-bottom: 48px;
}
.faq-title {
  font-size: clamp(34px, 4.5vw, 60px);
  margin-bottom: 18px;
}
.faq-sub {
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  font-weight: 300;
  max-width: 560px;
  margin: 0 auto;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--cream);
  border: 1px solid var(--cream-3);
  border-radius: 16px;
  padding: 4px 26px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.faq-item[open] {
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(43,39,34,0.06);
}
.faq-item summary {
  font-family: var(--serif);
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  list-style: none;
  padding: 22px 36px 22px 0;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 300;
  color: var(--accent);
  transition: transform 0.25s;
}
.faq-item[open] summary::after {
  content: '−';
  transform: translateY(-50%);
}
.faq-item p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  padding: 0 0 24px;
  max-width: 680px;
}

/* ===========================================
   DOWNLOAD SECTION
   =========================================== */
.download-section {
  padding: var(--sec-pad) 0;
  background: var(--dark);
}
.download-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  text-align: center;
}
.download-title {
  font-size: clamp(46px, 6.5vw, 90px);
  color: white;
  margin-bottom: 20px;
}
.download-title em { color: var(--accent-light); }
.download-sub {
  font-size: 18px;
  color: rgba(255,255,255,0.5);
  font-weight: 300;
  margin-bottom: 52px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.download-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.btn-dl-ios {
  background: white;
  color: var(--dark);
}
.btn-dl-ios:hover {
  background: rgba(255,255,255,0.92);
  box-shadow: 0 14px 40px rgba(255,255,255,0.12);
}
.btn-dl-android {
  background: transparent;
  color: white;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.3);
}
.btn-dl-android:hover {
  background: rgba(255,255,255,0.07);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.5), 0 14px 40px rgba(0,0,0,0.15);
}
.download-note {
  font-size: 13px;
  color: rgba(255,255,255,0.3);
}

/* ===========================================
   FOOTER
   =========================================== */
.footer {
  background: #0D0904;
  padding: 70px 0 0;
}
.footer-top {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter) 56px;
  display: flex;
  gap: 80px;
  align-items: flex-start;
}
.footer-brand { flex-shrink: 0; }
.footer-logo  {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.footer-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  flex-shrink: 0;
}
.footer-tagline { font-size: 14px; color: rgba(255,255,255,0.3); }

.footer-nav {
  display: flex;
  gap: 60px;
  flex: 1;
  justify-content: flex-end;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 4px;
}
.footer-col a {
  font-size: 14px;
  color: rgba(255,255,255,0.4);
  transition: color 0.2s;
}
.footer-col a:hover { color: white; }

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 22px var(--gutter);
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom span { font-size: 13px; color: rgba(255,255,255,0.25); }
.footer-social  { display: flex; gap: 22px; }
.footer-social a {
  font-size: 13px;
  color: rgba(255,255,255,0.25);
  transition: color 0.2s;
}
.footer-social a:hover { color: rgba(255,255,255,0.65); }

/* ===========================================
   SCROLL REVEAL
   =========================================== */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 1000px) {
  .hero {
    align-items: flex-start;
    min-height: auto;
    padding-bottom: 64px;
  }
  .hero-content {
    grid-template-columns: 1fr;
    gap: 44px;
    padding-top: 40px;
    padding-bottom: 0;
  }
  .hero-visual { justify-content: center; }
  .video-frame { max-width: 260px; border-radius: 22px; }

  .feature-inner {
    grid-template-columns: 1fr;
    gap: 52px;
  }
  .feature-rev .feature-phone { order: 0; }
  .feature-text { max-width: 520px; margin: 0 auto; }
  .feature-phone { display: none; }

  .ways-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin: 0 auto;
  }
  .way-card:first-child { border-radius: 16px 16px 0 0; }
  .way-card:last-child  { border-radius: 0 0 16px 16px; }

  .footer-top {
    flex-direction: column;
    gap: 44px;
  }
  .footer-nav { justify-content: flex-start; gap: 40px; }
}

@media (max-width: 640px) {
  :root {
    --gutter: 22px;
    --sec-pad: 72px;
  }
  .nav-links { display: none; }
  .hero-title { font-size: clamp(44px, 12vw, 54px); }
  .hero-ctas { flex-direction: column; max-width: 280px; }
  .video-frame { max-width: 220px; border-radius: 18px; }
  .feature-text { order: 1; }
  .feature-phone { order: 2; display: flex; }
  .feature-rev .feature-phone { order: 2; }
  .ways-grid { gap: 2px; }
  .footer-nav { flex-wrap: wrap; gap: 28px 40px; }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .download-ctas { flex-direction: column; align-items: center; }
}

/* ===========================================
   REDUCED MOTION
   =========================================== */
@media (prefers-reduced-motion: reduce) {
  .video-frame { animation: none; }
  .reveal       { opacity: 1; transform: none; transition: none; }
  .waveform span { transition: none; }
}
