/* ======================================================================
   Zoufalky — component styles (landing + subpages)
   ====================================================================== */

/* ---------- DESWOM app teaser ---------- */
.deswom { position: relative; overflow: hidden; }
.deswom-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.deswom-badge {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--line-on-dark); border-radius: 100px; padding: 8px 16px;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 26px;
}
.deswom-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulseDot 2.4s infinite; }
@keyframes pulseDot { 0% { box-shadow: 0 0 0 0 rgba(168,133,96,.6);} 70%{ box-shadow: 0 0 0 9px rgba(168,133,96,0);} 100%{ box-shadow:0 0 0 0 rgba(168,133,96,0);} }
.deswom h2 { font-family: var(--serif); font-size: clamp(40px, 7vw, 96px); line-height: .96; letter-spacing: -.02em; }
.deswom h2 .sub { display: block; font-size: clamp(15px, 1.6vw, 19px); font-family: var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--accent); margin-top: 18px; font-weight: 500; }
.deswom .lead { margin-top: 26px; max-width: 520px; }

.cats { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.cats li { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: baseline; padding: 18px 0; border-top: 1px solid var(--line-on-dark); }
.cats li:last-child { border-bottom: 1px solid var(--line-on-dark); }
.cats .c-name { font-family: var(--serif); font-size: clamp(20px, 2.4vw, 27px); }
.cats .c-tags { font-size: 14px; color: rgba(233,226,210,.66); letter-spacing: .02em; }

/* phone mock — light app home */
.phone {
  position: relative; width: min(310px, 78vw); aspect-ratio: 9/19; margin: 0 auto;
  background: #15100b; border-radius: 42px; padding: 12px;
  box-shadow: 0 40px 80px rgba(0,0,0,.45), inset 0 0 0 1.5px rgba(233,226,210,.12);
}
.phone-screen { width: 100%; height: 100%; border-radius: 32px; overflow: hidden; position: relative; background: linear-gradient(180deg, #F4EFE4 0%, #E9E2D2 100%); display: flex; flex-direction: column; }
.phone-notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 92px; height: 22px; background: #15100b; border-radius: 0 0 14px 14px; z-index: 3; }
.phone-app { padding: 40px 16px 14px; color: var(--ink); display: flex; flex-direction: column; height: 100%; }
.phone-app .app-top { display: flex; align-items: flex-start; justify-content: space-between; }
.phone-app .app-mark { font-family: var(--serif); font-size: 21px; letter-spacing: .04em; color: var(--ink); }
.phone-app .app-tag { font-size: 8px; letter-spacing: .3em; text-transform: uppercase; color: var(--accent-dk); margin-top: 3px; }
.phone-app .app-ava { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(140deg, var(--accent), var(--accent-dk)); box-shadow: inset 0 0 0 2px #fff, 0 4px 10px -4px rgba(140,106,72,.7); flex-shrink: 0; }
.phone-app .app-hello { font-family: var(--serif); font-size: 19px; line-height: 1.18; margin-top: 18px; color: var(--ink); }
.phone-app .app-hello em { font-style: italic; color: var(--accent-dk); }
.phone-feat { margin-top: 15px; background: linear-gradient(150deg, var(--accent) 0%, var(--accent-dk) 100%); color: #fff; border-radius: 18px; padding: 15px; box-shadow: 0 14px 26px -14px rgba(140,106,72,.8); }
.phone-feat .pf-label { font-size: 8px; letter-spacing: .24em; text-transform: uppercase; opacity: .9; }
.phone-feat .pf-title { font-family: var(--serif); font-size: 18px; line-height: 1.15; margin-top: 8px; }
.phone-feat .pf-meta { font-size: 10px; margin-top: 10px; opacity: .9; }
.phone-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 13px; margin-top: 11px; box-shadow: 0 10px 22px -18px rgba(44,31,24,.6); }
.phone-card .pc-eyebrow { font-size: 8px; letter-spacing: .24em; text-transform: uppercase; color: var(--accent-dk); }
.phone-card .pc-title { font-family: var(--serif); font-size: 16px; margin-top: 6px; line-height: 1.2; color: var(--ink); }
.phone-card .pc-row { display: flex; align-items: center; gap: 9px; font-size: 10px; color: var(--ink-soft); margin-top: 10px; }
.pc-dots { display: inline-flex; }
.pc-dots i { width: 16px; height: 16px; border-radius: 50%; background: var(--sand); border: 1.5px solid #fff; margin-left: -5px; }
.pc-dots i:first-child { margin-left: 0; }
.phone-tabbar { margin-top: auto; display: flex; justify-content: space-around; padding-top: 12px; border-top: 1px solid var(--line); font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.phone-tabbar span.on { color: var(--accent-dk); font-weight: 700; }
/* Mastermind enrollment card */
.phone-mm { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 13px; margin-top: 11px; box-shadow: 0 10px 22px -18px rgba(44,31,24,.6); }
.phone-mm .mm-head { display: flex; align-items: center; justify-content: space-between; }
.phone-mm .mm-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 8px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-dk); font-weight: 700; }
.phone-mm .mm-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.phone-mm .mm-spots { font-size: 8px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.phone-mm .mm-title { font-family: var(--serif); font-size: 16px; margin-top: 8px; line-height: 1.2; color: var(--ink); }
.phone-mm .mm-meta { font-size: 10px; color: var(--ink-soft); margin-top: 6px; }
.phone-mm .mm-btn { display: block; text-align: center; margin-top: 12px; background: var(--ink); color: var(--cream); font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 9px; border-radius: 9px; }

/* ---------- Countdown ---------- */
.countdown { display: flex; gap: clamp(14px, 3vw, 40px); flex-wrap: wrap; }
.cd-unit { text-align: center; min-width: 72px; }
.cd-num { font-family: var(--serif); font-size: clamp(40px, 7vw, 76px); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cd-label { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; margin-top: 10px; opacity: .65; }
.cd-sep { font-family: var(--serif); font-size: clamp(34px, 6vw, 64px); opacity: .3; align-self: flex-start; }

/* ---------- Email / newsletter ---------- */
.news { position: relative; overflow: hidden; }
.news-quote {
  font-family: var(--serif); font-style: italic; font-size: clamp(28px, 4.6vw, 56px);
  line-height: 1.16; letter-spacing: -.01em; text-wrap: balance; min-height: 1.16em;
  transition: opacity .5s;
}
.news-attrib { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); margin-top: 22px; }
.news-form { display: flex; gap: 12px; max-width: 540px; margin-top: 40px; flex-wrap: wrap; }
.news-form input[type=email] {
  flex: 1; min-width: 220px; font-family: var(--sans); font-size: 16px;
  padding: 16px 20px; border: 1px solid var(--ink); background: transparent; color: var(--ink);
  border-radius: 0; outline: none;
}
.news-form input::placeholder { color: var(--ink-soft); opacity: .6; }
.news.bg-ink .news-form input[type=email] { border-color: rgba(233,226,210,.4); color: var(--cream); }
.news.bg-ink .news-form input::placeholder { color: rgba(233,226,210,.5); }
.news-note { font-size: 13px; color: var(--ink-soft); margin-top: 16px; opacity: .75; }
.news.bg-ink .news-note { color: rgba(233,226,210,.6); }
.news-success { font-family: var(--serif); font-style: italic; font-size: 20px; margin-top: 24px; color: var(--accent); display: none; }
.news-success.show { display: block; }

/* ---------- Newsletter modal ---------- */
.nlm { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center; padding: 20px; }
.nlm[hidden] { display: none !important; }
.nlm.open { display: flex; }
.nlm-bg { position: absolute; inset: 0; background: rgba(28,18,12,.58); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .28s ease; }
.nlm.open .nlm-bg { opacity: 1; }
.nlm-card {
  position: relative; z-index: 1; background: var(--cream-2); color: var(--ink);
  width: min(460px, 100%); padding: clamp(36px, 5vw, 52px) clamp(28px, 4vw, 44px);
  text-align: center; border: 1px solid rgba(168,133,96,.35);
  box-shadow: 0 50px 110px -30px rgba(28,18,12,.45);
  transform: translateY(14px) scale(.97); opacity: 0;
  transition: transform .32s cubic-bezier(.2,.7,.3,1), opacity .28s ease;
}
.nlm.open .nlm-card { transform: translateY(0) scale(1); opacity: 1; }
.nlm-x {
  position: absolute; top: 14px; right: 14px; background: none; border: 0; cursor: pointer;
  color: var(--ink-soft); padding: 8px; line-height: 0; opacity: .65; transition: opacity .2s, color .2s;
}
.nlm-x:hover { opacity: 1; color: var(--ink); }
.nlm-heart { color: var(--accent-dk); margin: 0 auto 18px; display: inline-flex; }
.nlm-eyebrow { font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--accent-dk); font-weight: 600; margin: 0 0 14px; }
.nlm-title { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 3.6vw, 38px); line-height: 1.12; letter-spacing: -.01em; margin: 0 0 14px; color: var(--ink); }
.nlm-title em { font-style: italic; color: var(--accent-dk); }
.nlm-msg { font-size: 15px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 28px; }
.nlm-ok { margin: 0 auto; min-width: 200px; justify-content: center; }
.nlm-foot { font-size: 11.5px; letter-spacing: .04em; color: var(--ink-soft); margin: 22px 0 0; opacity: .72; }
.nlm.is-error .nlm-heart { color: #8C2D3F; }
.nlm.is-error .nlm-eyebrow { color: #8C2D3F; }
@media (max-width: 520px) {
  .nlm-card { padding: 32px 22px; }
}

/* dots indicator */
.quote-dots { display: flex; gap: 8px; margin-top: 30px; }
.quote-dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; background: currentColor; opacity: .25; cursor: pointer; padding: 0; transition: opacity .25s, width .25s; }
.quote-dots button.active { opacity: .9; width: 22px; border-radius: 4px; }

/* ---------- Merch ---------- */
.merch-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 1.8vw, 26px); }
.product { display: flex; flex-direction: column; }
.product .ph { position: relative; aspect-ratio: 4/5; overflow: hidden; background: var(--paper); }
.product .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.3,1); }
.product:hover .ph img { transform: scale(1.05); }
.product .tag { position: absolute; top: 12px; left: 12px; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; background: var(--cream); color: var(--ink); padding: 5px 10px; }
.product .buy {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  background: var(--ink); color: var(--cream); border: 0; padding: 13px;
  font-family: var(--sans); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
  cursor: pointer; opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s, background .25s;
}
.product:hover .buy { opacity: 1; transform: none; }
.product .buy:hover { background: var(--accent); color: var(--ink); }
.product .buy.soon {
  background: rgba(28,18,12,.78); color: var(--cream); opacity: 1; transform: none;
  cursor: default; pointer-events: none; text-align: center;
}
.product .buy.soon:hover { background: rgba(28,18,12,.78); color: var(--cream); }
.product .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-top: 14px; }
.product .p-name { font-family: var(--serif); font-size: 19px; }
.product .p-price { font-size: 14px; color: var(--ink-soft); white-space: nowrap; letter-spacing: .02em; }
.product .p-sub { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-dk); margin-top: 3px; }

/* ---------- Founders ---------- */
.founders { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(32px, 6vw, 84px); align-items: center; }
.founder-names { font-family: var(--serif); font-size: clamp(30px, 4.4vw, 52px); line-height: 1.08; letter-spacing: -.01em; }
.founder-names .amp { color: var(--accent); font-style: italic; }
.founder-role { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--accent-dk); margin-top: 14px; }
.founder-body { margin-top: 26px; color: var(--ink-soft); max-width: 460px; }
.founder-body p + p { margin-top: 16px; }
.founder-sign { font-family: var(--serif); font-style: italic; font-size: 26px; margin-top: 26px; }

/* ---------- Founder medallions (individual) ---------- */
.founder-cards { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4.5vw, 70px); }
.founder-card { display: flex; flex-direction: column; }
.founder-photo { aspect-ratio: 4/5; box-shadow: 0 26px 60px -34px rgba(44,31,24,.5); border-radius: 0; }
.founder-medallion { margin-top: clamp(22px, 2.6vw, 32px); position: relative; padding-top: 26px; }
.founder-medallion::before { content: ""; position: absolute; top: 0; left: 0; width: 42px; height: 2px; background: var(--accent); }
.founder-name { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 3.5vw, 44px); line-height: 1.03; letter-spacing: -.015em; margin-top: 14px; }
.founder-bio { margin-top: 18px; color: var(--ink-soft); font-size: 16.5px; line-height: 1.6; max-width: 44ch; }
.founder-sign-name { font-style: italic; font-size: 23px; margin-top: 20px; color: var(--accent-dk); }
.founder-together { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.6vw, 30px); text-align: center; margin-top: clamp(46px, 5.5vw, 72px); display: flex; flex-direction: column; align-items: center; gap: 22px; text-wrap: balance; }
.founder-together .link-arrow { font-family: var(--sans); font-style: normal; }

/* ---------- Instagram ---------- */
.ig-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; }
.ig-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(10px, 1.4vw, 18px); margin-top: 48px; }
.ig-post { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--ink); color: var(--cream); display: flex; padding: 20px; cursor: pointer; }
.ig-post.photo { padding: 0; }
.ig-post.photo img { width: 100%; height: 100%; object-fit: cover; }
.ig-post .ig-quote { font-family: var(--serif); font-style: italic; font-size: clamp(15px, 1.5vw, 19px); line-height: 1.3; align-self: center; text-wrap: balance; }
.ig-post.accent { background: var(--accent); color: var(--ink); }
.ig-post.paper { background: var(--paper); color: var(--ink); }
.ig-post .ig-hover { position: absolute; inset: 0; background: rgba(44,31,24,.55); color: var(--cream); display: flex; align-items: center; justify-content: center; gap: 8px; opacity: 0; transition: opacity .3s; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.ig-post:hover .ig-hover { opacity: 1; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; background: none; border: 0; cursor: pointer; text-align: left;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 26px 0; font-family: var(--serif); font-size: clamp(19px, 2.4vw, 26px); color: var(--ink);
}
.faq-q .ic { flex: none; width: 22px; height: 22px; position: relative; }
.faq-q .ic::before, .faq-q .ic::after { content: ""; position: absolute; background: var(--accent-dk); transition: transform .3s; }
.faq-q .ic::before { top: 50%; left: 0; right: 0; height: 1.5px; transform: translateY(-50%); }
.faq-q .ic::after { left: 50%; top: 0; bottom: 0; width: 1.5px; transform: translateX(-50%); }
.faq-item.open .faq-q .ic::after { transform: translateX(-50%) scaleY(0); }
.faq-a { overflow: hidden; max-height: 0; transition: max-height .4s ease; }
.faq-a-inner { padding: 0 0 28px; color: var(--ink-soft); max-width: 680px; }

/* ---------- Tiers (app page) ---------- */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.4vw, 32px); }
.tier { border: 1px solid var(--line); padding: clamp(26px, 3vw, 40px); display: flex; flex-direction: column; background: var(--cream-2); }
.tier.featured { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.tier.featured .eyebrow { color: var(--accent); }
.tier .t-name { font-family: var(--serif); font-size: clamp(26px, 3vw, 36px); margin: 16px 0 6px; }
.tier .t-price { font-size: 15px; color: var(--ink-soft); }
.tier.featured .t-price { color: rgba(233,226,210,.7); }
.tier ul { list-style: none; padding: 0; margin: 24px 0 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.tier li { font-size: 15px; padding-left: 24px; position: relative; }
.tier li::before { content: ""; position: absolute; left: 0; top: 9px; width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--accent); }
.tier.featured li::before { border-color: var(--accent); }
.tier .ribbon { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }

/* ---------- Page hero (subpages) ---------- */
.page-hero { padding-top: clamp(130px, 16vw, 200px); padding-bottom: clamp(40px, 6vw, 80px); }
.page-hero h1 { font-family: var(--serif); font-size: clamp(44px, 8vw, 104px); line-height: .98; letter-spacing: -.02em; white-space: nowrap; }
.page-hero .lead { margin-top: 24px; max-width: 600px; }

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 44px); }
.post-card { display: flex; flex-direction: column; }
.post-card .pc-img { aspect-ratio: 3/2; overflow: hidden; background: var(--paper); }
.post-card .pc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.post-card:hover .pc-img img { transform: scale(1.04); }
.post-card .pc-cat { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-dk); margin: 18px 0 10px; }
.post-card h3 { font-family: var(--serif); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.12; }
.post-card p { color: var(--ink-soft); font-size: 15px; margin-top: 10px; }
.post-card .pc-date { font-size: 13px; color: var(--ink-soft); opacity: .7; margin-top: 14px; }

.quote-card { background: var(--ink); color: var(--cream); padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; justify-content: space-between; min-height: 280px; }
.quote-card.accent { background: var(--accent); color: var(--ink); }
.quote-card .qc-mark { font-family: var(--serif); font-size: 60px; line-height: .6; opacity: .4; }
.quote-card .qc-text { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.22; margin-top: 18px; }
.quote-card .qc-day { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; margin-top: 24px; opacity: .7; }

@media (max-width: 980px) {
  .merch-grid { grid-template-columns: repeat(2, 1fr); }
  .ig-grid { grid-template-columns: repeat(3, 1fr); }
  .tiers { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .deswom-grid { grid-template-columns: 1fr; }
  .founders { grid-template-columns: 1fr; }
  .founder-cards { grid-template-columns: 1fr; gap: clamp(40px, 9vw, 60px); }
  .product .buy { opacity: 1; transform: none; position: static; margin-top: 12px; }
}
@media (max-width: 560px) {
  .merch-grid { grid-template-columns: 1fr 1fr; }
  .ig-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Mobile / tablet safety patch
   Address common overflow + readability bugs at ≤900px.
   ============================================================ */
@media (max-width: 900px) {
  /* Block any accidental horizontal scroll */
  html, body { overflow-x: hidden; }

  /* Long badge text needs to wrap */
  .deswom-badge { white-space: normal; line-height: 1.45; max-width: 100%; }

  /* Category rows stack name + tags on mobile */
  .cats li { grid-template-columns: 1fr; gap: 6px; }
  .cats .c-tags { word-break: break-word; }

  /* App page tier buttons stay full-width (already inline-styled);
     ensure CTA groups in hero/page-hero wrap nicely */
  .hero-cv-cta .btn,
  .page-hero .btn { padding: 14px 22px; font-size: 12px; letter-spacing: .1em; }

  /* Page-hero titles: always single line on subpages */
  .page-hero h1 { font-size: clamp(28px, 7vw, 56px); }

  /* Countdown — let segments wrap if they don't fit */
  .countdown { flex-wrap: wrap; row-gap: 14px; justify-content: center; }
  .countdown .cd-sep { display: none; }

  /* Phone & dashboard mockups never wider than column */
  .phone, .dash { max-width: 100%; }

  /* News form on narrow screens — stack input + button */
  .news-form { flex-direction: column; align-items: stretch; }
  .news-form input[type=email],
  .news-form button { width: 100%; }
}

@media (max-width: 480px) {
  /* Tighter section padding */
  .section { padding-block: clamp(56px, 12vw, 90px); }
  /* Big display titles wrap better at small sizes */
  .display, .page-hero h1 { word-break: keep-all; }
  /* IG grid 2 -> 2 on phones; products stay 2 col already */
  .ig-grid { grid-template-columns: repeat(2, 1fr); }
}
