/* Daydan landing page. Builds on tokens.css. Mobile first, RTL. */

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: 12px; top: -48px; background: var(--navy); color: var(--white); padding: 8px 14px; border-radius: var(--r-sm); z-index: 50; transition: top var(--t-fast); }
.skip:focus { top: 12px; }
.muted { color: var(--ink-3); }
.small { font-size: var(--fs-xs); }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: var(--fs-sm); }
.btn-block { width: 100%; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.card-label { margin: 0 0 8px; font-size: var(--fs-xs); font-weight: 600; color: var(--navy-2); letter-spacing: 0; }

/* Type */
h1, h2, h3 { margin: 0; line-height: var(--lh-tight); color: var(--ink); font-weight: 700; }
h1 { font-size: var(--fs-3xl); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); }
h3 { font-size: var(--fs-lg); font-weight: 600; }
p { margin: 0; }
.overline { font-size: var(--fs-sm); font-weight: 600; color: var(--navy-2); margin-bottom: var(--s3); display: inline-flex; align-items: center; gap: 10px; }
.overline::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--sky); }
.overline.on-dark { color: var(--sky); }
.lead { font-size: var(--fs-lg); color: var(--ink-2); max-width: 34em; }
.sec-head { max-width: 720px; margin-bottom: var(--s7); }
.sec-head h2 { margin-bottom: var(--s3); }
.sec-lead { color: var(--ink-2); font-size: var(--fs-lg); }
.fine { font-size: var(--fs-xs); color: var(--ink-3); margin-top: var(--s4); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 30; background: rgba(251, 252, 254, 0.86); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color var(--t-med), background var(--t-med); }
.nav.is-scrolled { border-bottom-color: var(--line); background: rgba(251, 252, 254, 0.96); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); height: 68px; }
.brand { display: inline-flex; flex-direction: column; align-items: center; gap: 5px; text-decoration: none; }
.brand .logo { font-size: 30px; }
.brand-bar { width: 34px; height: 3px; border-radius: 2px; background: var(--sky); transform-origin: center; transition: width var(--t-med) var(--ease); }
.brand:hover .brand-bar { width: 48px; }
.nav-links { display: none; gap: var(--s5); }
.nav-links a { color: var(--ink-2); text-decoration: none; font-size: var(--fs-sm); font-weight: 500; position: relative; padding: 6px 0; }
.nav-links a::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px; background: var(--navy); transform: scaleX(0); transform-origin: right; transition: transform var(--t-med) var(--ease); }
.nav-links a:hover { color: var(--navy); }
.nav-links a:hover::after, .nav-links a.is-active::after { transform: scaleX(1); }
.nav-links a.is-active { color: var(--navy); }
.nav-cta { display: flex; gap: var(--s2); }
.hide-sm { display: none; }

/* Hero */
.hero { padding: var(--s7) 0 var(--s8); overflow: hidden; }
.hero-in { display: grid; gap: var(--s7); align-items: center; }
.hero-copy h1 { margin-bottom: var(--s4); }
.hl { color: var(--navy); position: relative; white-space: nowrap; }
.hl::after { content: ""; position: absolute; inset-inline: -2px; bottom: 0.08em; height: 0.22em; background: var(--sky); opacity: 0.45; border-radius: 3px; z-index: -1; transform: scaleX(0); transform-origin: right; animation: hl-in 900ms var(--ease) 500ms forwards; }
@keyframes hl-in { to { transform: scaleX(1); } }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s5) 0 var(--s4); }
.launch { display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--ink-3); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 0 rgba(55, 138, 221, 0.5); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(55, 138, 221, 0.45); } 70% { box-shadow: 0 0 0 10px rgba(55, 138, 221, 0); } 100% { box-shadow: 0 0 0 0 rgba(55, 138, 221, 0); } }

.hero-visual { position: relative; display: grid; gap: var(--s4); }
.convo { padding: var(--s4); background: linear-gradient(180deg, var(--white), var(--mist-2)); }
.convo-head { display: flex; align-items: center; gap: var(--s3); padding-bottom: var(--s3); border-bottom: 1px solid var(--line); margin-bottom: var(--s3); }
.convo-head strong { display: block; font-size: var(--fs-sm); }
.convo-head .muted { font-size: var(--fs-xs); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: var(--white); display: grid; place-items: center; font-size: 20px; flex: none; }
.convo-body { display: flex; flex-direction: column; justify-content: flex-end; gap: var(--s2); height: 372px; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 56px); mask-image: linear-gradient(to bottom, transparent 0, #000 56px); }
.convo-body > * { flex: none; }
.convo-body > * { animation: msg-in 420ms var(--ease) both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
.convo-body .note { align-self: center; font-size: 11px; color: var(--ink-3); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 2px 10px; }
.convo-body .reply-btns span.is-picked { background: var(--navy); border-color: var(--navy); color: var(--white); }
.convo-body .alert-mini { margin-top: var(--s2); align-self: stretch; border-radius: var(--r-md); background: var(--white); border: 1px solid var(--line); border-inline-start: 3px solid var(--navy); padding: 10px 12px; font-size: var(--fs-xs); color: var(--ink-2); border-start-start-radius: 0; border-end-start-radius: 0; }
.convo-body .alert-mini strong { color: var(--navy); display: block; font-size: var(--fs-sm); }

.curve { padding: var(--s4) var(--s4) var(--s2); }
.curve figcaption { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-sm); font-weight: 600; margin-bottom: 4px; }
.curve-svg { width: 100%; height: auto; overflow: visible; }
.curve-svg .grid line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 5; }
.curve-area { fill: var(--mist); opacity: 0; transition: opacity 900ms var(--ease) 900ms; }
.curve-line { fill: none; stroke: var(--navy); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset 1600ms var(--ease) 200ms; }
.curve.is-in .curve-line { stroke-dashoffset: 0; }
.curve.is-in .curve-area { opacity: 1; }
.pts g { opacity: 0; transform: translateY(4px); transition: opacity 400ms var(--ease), transform 400ms var(--ease); transition-delay: calc(400ms + var(--d) * 380ms); }
.curve.is-in .pts g { opacity: 1; transform: none; }
.pts circle { fill: var(--white); stroke: var(--navy); stroke-width: 2.5; }
.pts text { font-size: 12px; font-weight: 700; fill: var(--navy); text-anchor: middle; font-family: var(--font); }
.pts text.dx { font-size: 10.5px; font-weight: 500; fill: var(--ink-3); }

/* Sections */
.section { padding: var(--s9) 0; }
.section.tint { background: var(--mist-2); border-block: 1px solid var(--line); }

/* Compare */
.compare { display: grid; gap: var(--s4); }
.compare-col { padding: var(--s5); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--white); }
.compare-col.is-daydan { background: var(--navy); border-color: var(--navy); color: var(--white); }
.compare-title { margin-bottom: var(--s4); font-size: var(--fs-md); }
.muted-title { color: var(--ink-3); font-weight: 600; }
.logo.sm { font-size: 26px; color: var(--white); }
.compare-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.compare-list li { position: relative; padding-inline-start: 26px; color: var(--ink-2); }
.compare-list li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.72em; width: 12px; height: 2px; background: var(--line-2); border-radius: 2px; }
.compare-list.checks li { color: var(--white); }
.compare-list.checks li::before { width: 6px; height: 11px; top: 0.42em; inset-inline-start: 4px; background: none; border-right: 2px solid var(--sky); border-bottom: 2px solid var(--sky); border-radius: 0; transform: rotate(45deg); }

/* Steps with a drawn thread */
.steps { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: var(--s6); }
.thread { position: absolute; inset-inline-start: 19px; top: 20px; bottom: 20px; width: 4px; height: calc(100% - 40px); overflow: visible; }
.thread path { fill: none; stroke: var(--sky); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 100; stroke-dashoffset: var(--draw, 100); }
.step { display: grid; grid-template-columns: 40px 1fr; gap: var(--s4); align-items: start; position: relative; }
.step-n { width: 40px; height: 40px; border-radius: 50%; background: var(--white); border: 2px solid var(--navy); color: var(--navy); display: grid; place-items: center; font-weight: 700; position: relative; z-index: 1; transition: background var(--t-med), color var(--t-med); }
.step.is-in .step-n { background: var(--navy); color: var(--white); transition-delay: 300ms; }
.step h3 { margin: 6px 0 6px; }
.step p { color: var(--ink-2); max-width: 36em; }

/* Protocols */
.proto { margin-bottom: var(--s7); }
.proto-tabs { display: flex; gap: var(--s2); overflow-x: auto; padding-bottom: var(--s2); margin-bottom: var(--s4); scrollbar-width: none; }
.proto-tabs::-webkit-scrollbar { display: none; }
.proto-tab { flex: none; border: 1px solid var(--line-2); background: var(--white); color: var(--ink-2); border-radius: var(--r-pill); padding: 8px 16px; font-size: var(--fs-sm); font-weight: 500; cursor: pointer; transition: all var(--t-fast) var(--ease); }
.proto-tab:hover { border-color: var(--navy-2); color: var(--navy); }
.proto-tab[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.proto-body { display: grid; gap: var(--s4); }
.proto-timeline { position: relative; display: flex; gap: var(--s2); overflow-x: auto; padding: 18px 2px 8px; scrollbar-width: none; }
.proto-timeline::-webkit-scrollbar { display: none; }
.proto-timeline::before { content: ""; position: absolute; inset-inline: 8px; top: 34px; height: 2px; background: var(--line-2); }
.tp { position: relative; flex: none; display: grid; justify-items: center; gap: 8px; background: none; border: 0; cursor: pointer; padding: 0 6px; color: var(--ink-3); font-size: var(--fs-xs); min-width: 76px; animation: tp-in 420ms var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
@keyframes tp-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tp .knob { direction: ltr; unicode-bidi: isolate; width: 34px; height: 34px; border-radius: 50%; background: var(--white); border: 2px solid var(--line-2); display: grid; place-items: center; font-weight: 700; font-size: 12px; color: var(--ink-3); z-index: 1; transition: all var(--t-med) var(--ease); }
.tp:hover .knob { border-color: var(--navy-2); color: var(--navy); }
.tp[aria-selected="true"] { color: var(--navy); font-weight: 600; }
.tp[aria-selected="true"] .knob { background: var(--navy); border-color: var(--navy); color: var(--white); transform: scale(1.08); }
.proto-day { padding: var(--s5); }
.proto-day .day-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); margin-bottom: var(--s4); flex-wrap: wrap; }
.proto-day .day-head h3 { font-size: var(--fs-md); }
.msgs { display: grid; gap: var(--s3); }
.msg { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s3) var(--s4); animation: msg-in 380ms var(--ease) both; animation-delay: calc(var(--i) * 70ms); }
.msg .kind { font-size: 11px; font-weight: 600; color: var(--navy-2); display: block; margin-bottom: 2px; }
.msg .text { font-size: var(--fs-sm); }
.msg .rules { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s4); }
.facts li { padding: var(--s4) var(--s5); border-inline-start: 3px solid var(--navy); background: var(--white); border-radius: var(--r-md); border-start-start-radius: 0; border-end-start-radius: 0; box-shadow: var(--shadow-1); }
.facts strong { display: block; margin-bottom: 4px; }
.facts span { color: var(--ink-2); font-size: var(--fs-sm); }

/* Safety */
.levels { display: grid; gap: var(--s4); margin-bottom: var(--s6); }
.level { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); }
.level h3 { margin: 10px 0 6px; }
.level p { color: var(--ink-2); font-size: var(--fs-sm); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot.ok { background: var(--ok); } .dot.attn { background: #d58a2b; } .dot.navy { background: var(--navy); }
.redflags { margin: 0; padding: var(--s5) var(--s6); background: var(--navy); color: var(--white); border-radius: var(--r-lg); position: relative; overflow: hidden; }
.redflags p:last-child { font-size: var(--fs-lg); line-height: 1.9; }
.rf-label { font-size: var(--fs-xs); color: var(--sky); font-weight: 600; margin-bottom: var(--s2) !important; }

/* Appointments */
.flow { list-style: none; margin: 0 0 var(--s6); padding: 0; display: grid; gap: var(--s3); counter-reset: f; }
.flow li { display: grid; grid-template-columns: 34px 1fr; column-gap: var(--s3); padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); position: relative; }
.flow-n { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; background: var(--mist); color: var(--navy); display: grid; place-items: center; font-weight: 700; }
.flow strong { font-size: var(--fs-md); }
.flow li > span:last-child { color: var(--ink-2); font-size: var(--fs-sm); }
.appt { display: grid; gap: var(--s5); align-items: start; }
.appt-card { padding: var(--s5); }
.appt-title { font-weight: 600; margin-bottom: 6px !important; }
.appt-card p { font-size: var(--fs-sm); color: var(--ink-2); }
.appt-notes { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s3); }
.appt-notes li { padding-inline-start: 22px; position: relative; color: var(--ink-2); }
.appt-notes li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.65em; width: 10px; height: 10px; border-radius: 3px; background: var(--sky); }

/* Morning */
.morning-cards { display: grid; gap: var(--s4); }
.msg-card { padding: var(--s5); }
.msg-card p { font-size: var(--fs-sm); color: var(--ink-2); }
.msg-card p strong { color: var(--ink); font-size: var(--fs-md); }
.summary { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: 8px; font-size: var(--fs-sm); }
.summary li { display: flex; align-items: center; gap: 10px; }

/* Data pillars */
.pillars { display: grid; gap: var(--s5); }
.pillar { padding: var(--s5); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--white); }
.pic { width: 36px; height: 36px; padding: 7px; border-radius: 10px; background: var(--mist); stroke: var(--navy); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: var(--s3); }
.pillar h3 { margin-bottom: 6px; }
.pillar p { color: var(--ink-2); font-size: var(--fs-sm); }

/* Join */
.join { background: var(--ink); color: var(--white); }
.join h2 { color: var(--white); margin-bottom: var(--s3); }
.join-copy p { color: #c7d6e6; font-size: var(--fs-lg); }
.join-in { display: grid; gap: var(--s7); align-items: start; }
.join-points { list-style: none; margin: var(--s5) 0 0; padding: 0; display: grid; gap: 10px; }
.join-points li { position: relative; padding-inline-start: 24px; color: #dbe6f2; }
.join-points li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 0.4em; width: 6px; height: 11px; border-right: 2px solid var(--sky); border-bottom: 2px solid var(--sky); transform: rotate(45deg); }
.join-form { padding: var(--s6) var(--s5); color: var(--ink); position: relative; display: grid; gap: var(--s4); }
.field { display: grid; gap: 6px; }
.field-row { display: grid; gap: var(--s4); }
.field label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.opt { font-weight: 400; color: var(--ink-3); font-size: var(--fs-xs); }
.field input, .field select { min-height: 46px; border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 0 14px; background: var(--white); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.field input:focus, .field select:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(55, 138, 221, 0.18); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field input[dir="ltr"] { text-align: right; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-sm); color: var(--ink-2); cursor: pointer; }
.consent input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--navy); flex: none; }
.err { color: var(--danger); font-size: var(--fs-xs); min-height: 0; }
.err:empty { display: none; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
#joinBtn[disabled] { opacity: 0.7; cursor: progress; }
.done { position: absolute; inset: 0; background: var(--white); border-radius: var(--r-lg); display: grid; place-content: center; justify-items: center; text-align: center; gap: 10px; padding: var(--s6); animation: msg-in 420ms var(--ease) both; }
.done[hidden] { display: none; }
.done-ico { width: 64px; height: 64px; }
.done-ico circle { fill: none; stroke: var(--mist); stroke-width: 3; }
.done-ico path { fill: none; stroke: var(--navy); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 600ms var(--ease) 200ms forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done p { color: var(--ink-2); }

/* Footer */
.foot { padding: var(--s7) 0; border-top: 1px solid var(--line); background: var(--paper); }
.foot-in { display: grid; gap: var(--s4); }
.foot .logo { font-size: 26px; }
.foot nav { display: flex; gap: var(--s5); flex-wrap: wrap; }
.foot nav a { color: var(--ink-2); text-decoration: none; font-size: var(--fs-sm); }
.foot nav a:hover { color: var(--navy); }

/* Larger screens */
@media (min-width: 720px) {
  .compare { grid-template-columns: 1fr 1fr; }
  .levels { grid-template-columns: repeat(3, 1fr); }
  .field-row { grid-template-columns: 1fr 1fr; }
  .morning-cards { grid-template-columns: 1fr 1fr; }
  .pillars { grid-template-columns: repeat(3, 1fr); }
  .facts { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .hide-sm { display: inline-flex; }
}
@media (min-width: 980px) {
  .nav-links { display: flex; }
  .hero { padding: var(--s8) 0 var(--s9); }
  .hero-in { grid-template-columns: 1.05fr 0.95fr; gap: var(--s8); }
  .hero-visual { grid-template-columns: 1fr; }
  .convo { margin-inline-end: 14%; box-shadow: var(--shadow-2); padding-bottom: 72px; }
  .curve { width: 60%; margin-top: -64px; margin-inline-start: 34%; margin-inline-end: -4%; box-shadow: var(--shadow-2); position: relative; z-index: 2; }
  .hero-visual { gap: 0; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: var(--s6); }
  .thread { inset-inline-start: 0; top: 19px; width: 100%; height: 4px; }
  .step { grid-template-columns: 1fr; }
  .flow { grid-template-columns: repeat(4, 1fr); }
  .flow li::after { content: ""; position: absolute; inset-inline-end: -14px; top: 30px; width: 10px; height: 10px; border-top: 2px solid var(--line-2); border-inline-start: 2px solid var(--line-2); transform: rotate(-45deg); }
  .flow li:last-child::after { display: none; }
  .appt { grid-template-columns: 1.1fr 0.9fr; }
  .proto-body { grid-template-columns: 1fr; }
  .join-in { grid-template-columns: 1fr 1fr; gap: var(--s8); }
  .foot-in { grid-template-columns: 1fr auto auto; align-items: center; }
}
