/* Homepage-only layouts. Reusable pieces belong in site.css / mocks.css. */

/* ---- Hero --------------------------------------------------------------- */
.hero { position: relative; padding-top: clamp(72px, 10vw, 136px); isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0 0 30% 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 80px 80px; background-position: center top;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 85%); mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 85%);
}
.hero .eyebrow { margin-bottom: 36px; }
.hero .display { max-width: 19ch; }
.hero__meta { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: end; margin-top: 48px; }
.hero__meta .lede { grid-column: 1 / span 6; }
.hero__meta .btn { grid-column: 10 / -1; justify-self: end; }
.hero__stage { margin-top: clamp(64px, 8vw, 112px); }
.hero__product { width: 100%; filter: drop-shadow(0 32px 48px rgba(14,17,22,.12)) drop-shadow(0 4px 10px rgba(14,17,22,.05)); }
.hero .eyebrow, .hero .display, .hero__meta { animation: heroIn 1s var(--ease) both; }
.hero .display { animation-delay: .05s; }
.hero__meta { animation-delay: .12s; }
.hero__stage { animation: heroIn 1.2s var(--ease) both .2s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(10px); } }

/* ---- Built-for strip ---------------------------------------------------- */
.strip { margin-top: clamp(48px, 6vw, 80px); border-top: 1px solid var(--rule); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
.strip .label { grid-column: 1 / span 3; padding: 24px 0; }
.strip ul { grid-column: 4 / -1; display: grid; grid-template-columns: repeat(4, 1fr); }
.strip li { padding: 20px 0 20px 20px; border-left: 1px solid var(--rule); font-family: var(--display); font-weight: 500; font-size: 17px; letter-spacing: -.01em; }

/* ---- Problem: numbered list -------------------------------------------- */
.list { border-top: 1px solid var(--ink); }
.list li { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); padding: 28px 0; border-bottom: 1px solid var(--rule); }
.list__n { grid-column: 1 / span 3; font-family: var(--mono); font-size: 12px; color: var(--faint); padding-top: 6px; }
.list h3 { grid-column: 4 / span 4; }
.list p { grid-column: 8 / -1; max-width: var(--measure); }
.statement { margin-top: clamp(56px, 7vw, 96px); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
.statement p { grid-column: 4 / -1; font-family: var(--display); font-weight: var(--w-head); font-size: clamp(28px, 3.2vw, 44px); letter-spacing: -.03em; line-height: 1.1; color: var(--ink); }

/* ---- Applications ------------------------------------------------------- */
.apps { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
.apps__inner { grid-column: 4 / -1; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.app { padding: 28px 28px 8px 0; }
.app + .app { padding-left: 28px; border-left: 1px solid var(--rule); }
.app .label { display: block; margin-bottom: 40px; }
.app .h3 { font-size: clamp(24px, 2.2vw, 30px); margin-bottom: 12px; }
.app p { font-size: 15px; }

/* ---- Product: scroll story ---------------------------------------------- */
.story { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
.story__rail { grid-column: 1 / span 5; position: relative; }
.story__sticky { position: sticky; top: 120px; padding-bottom: 40px; }
.story__steps { display: flex; gap: 6px; margin-bottom: 40px; }
.story__steps a { flex: 1; padding-top: 12px; border-top: 2px solid var(--rule); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); position: relative; transition: color var(--dur-2); }
.story__steps a::before { content: ""; position: absolute; left: 0; top: -2px; height: 2px; width: 0; background: var(--ink); transition: width .6s var(--ease); }
.story__steps a.is-active { color: var(--ink); }
.story__steps a.is-active::before, .story__steps a.is-past::before { width: 100%; }
.story__copies { display: grid; }
.story__copy { grid-area: 1 / 1; opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease); pointer-events: none; }
.story__copy.is-active { opacity: 1; transform: none; pointer-events: auto; }
.story__copy .label { display: block; margin-bottom: 16px; }
.story__copy .h3, .story__inline .h3 { font-size: clamp(26px, 2.4vw, 34px); letter-spacing: -.025em; line-height: 1.1; margin-bottom: 28px; }
.points { border-top: 1px solid var(--rule); }
.points li { padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.points b { display: block; color: var(--ink); font-weight: 500; margin-bottom: 2px; }
.story__panels { grid-column: 7 / -1; }
.story__panel { min-height: 82vh; display: flex; flex-direction: column; justify-content: center; padding: 6vh 0; }
.story__inline { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.story__visual {
  position: relative; border-radius: var(--r-xl); background: var(--panel-2); border: 1px solid var(--rule);
  padding: clamp(24px, 4vw, 56px) clamp(16px, 3vw, 40px); display: flex; justify-content: center; overflow: hidden;
}
.story__visual::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 32px 32px; opacity: .55;
}
.story__visual > * { position: relative; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.story__panel:not(.is-active) .story__visual > * { opacity: .35; transform: scale(.985); }

/* ---- Comparison --------------------------------------------------------- */
.compare { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
.compare__table { grid-column: 4 / -1; border-top: 1px solid var(--ink); }
.compare__row { display: grid; grid-template-columns: 1fr 1.15fr 1.15fr; column-gap: var(--col-gap); padding: 24px 0; border-bottom: 1px solid var(--rule); }
.compare__head { padding: 14px 0; }
.compare__head .label.is-packet { color: var(--ink); }
.compare h4 { font-size: 15px; font-weight: 500; font-family: var(--body); letter-spacing: -.005em; }
.compare .cost { display: block; font-family: var(--display); font-size: 19px; font-weight: 560; letter-spacing: -.015em; color: var(--ink); margin-bottom: 6px; line-height: 1.25; }
.compare .is-today .cost { color: var(--muted); }
.compare p { font-size: 14px; }
.compare__total { align-items: baseline; border-bottom: 1px solid var(--ink); }
.compare__total .big { font-family: var(--display); font-size: clamp(30px, 3.4vw, 48px); font-weight: var(--w-head); letter-spacing: -.035em; line-height: 1; color: var(--ink); }
.compare__total .is-today .big { color: var(--faint); }

/* ---- Architecture band -------------------------------------------------- */
.arch { padding-block: var(--section-y); }
.arch .sh { margin-bottom: clamp(56px, 6vw, 88px); }
.diagram { display: grid; grid-template-columns: 1fr 128px 1.25fr 128px 1fr; align-items: center; }
.node { border: 1px solid var(--night-rule); border-radius: var(--r-lg); background: var(--night-2); display: flex; flex-direction: column; }
.node__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--night-rule); font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--night-muted); }
.node__head b { color: #fff; font-weight: 500; }
.node ul { padding: 4px 18px; flex: 1; }
.node li { padding: 12px 0; font-family: var(--display); font-size: 17px; font-weight: 500; letter-spacing: -.01em; color: var(--night-text); }
.node li + li { border-top: 1px solid var(--night-rule); }
.node li small { display: block; font-family: var(--body); font-size: 13px; color: var(--night-muted); font-weight: 400; letter-spacing: 0; margin-top: 2px; }
.node__foot { padding: 12px 18px; border-top: 1px solid var(--night-rule); font-family: var(--mono); font-size: 10.5px; color: var(--night-muted); }
.node--core { background: linear-gradient(180deg, rgba(31,95,204,.16), var(--night-2) 55%); border-color: rgba(140,178,242,.35); box-shadow: 0 40px 80px -40px rgba(31,95,204,.5); }
.node--core .node__head b { color: var(--signal-soft); }
.node__tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 18px 16px; border-top: 1px solid var(--night-rule); }
.node__tags span { font-family: var(--mono); font-size: 10.5px; color: var(--night-text); border: 1px solid var(--night-rule); border-radius: var(--r-xs); padding: 3px 8px; }
.wire { position: relative; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 36px; padding: 48px 0; }
.wire span { position: relative; height: 1px; background: rgba(140,178,242,.28); overflow: hidden; }
.wire span::after { content: ""; position: absolute; top: 0; left: -30%; width: 30%; height: 1px; background: linear-gradient(90deg, transparent, var(--signal-soft), transparent); animation: flow 2.2s linear infinite; }
.wire span:nth-child(3)::after { animation-delay: .7s; }
.wire span:nth-child(4)::after { animation-delay: 1.4s; }
.wire span:nth-child(5)::after { animation-delay: 1s; }
@keyframes flow { to { left: 100%; } }
.wire em { position: absolute; left: 50%; top: calc(50% - 84px); transform: translateX(-50%); font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--night-muted); white-space: nowrap; }
.steps { margin-top: clamp(56px, 6vw, 88px); display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--night-rule); }
.steps li { padding: 24px 24px 0 0; }
.steps li + li { padding-left: 24px; border-left: 1px solid var(--night-rule); }
.steps .label { display: block; color: var(--signal-soft); margin-bottom: 14px; }
.steps h4 { font-family: var(--display); font-size: 18px; font-weight: 560; letter-spacing: -.015em; margin-bottom: 6px; }
.steps p { font-size: 14px; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 1080px) {
  .story__rail { display: none; }
  .story__panels { grid-column: 1 / -1; }
  .story__panel { min-height: 0; padding: 0 0 72px; }
  .story__inline { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; margin-bottom: 28px; }
  .story__inline .label { display: block; margin-bottom: 14px; }
  .story__panel:not(.is-active) .story__visual > * { opacity: 1; transform: none; }
  .diagram { grid-template-columns: 1fr; }
  .wire { flex-direction: row; justify-content: center; gap: 24px; padding: 0; height: 56px; }
  .wire span { width: 1px; height: 100%; }
  .wire span::after { left: 0; top: -30%; width: 1px; height: 30%; background: linear-gradient(180deg, transparent, var(--signal-soft), transparent); animation-name: flowV; }
  .wire span:nth-child(n+4) { display: none; }
  .wire em { top: 50%; left: calc(50% + 28px); transform: translateY(-50%); }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .steps li:nth-child(n+3) { border-top: 1px solid var(--night-rule); margin-top: 24px; }
}
@keyframes flowV { to { top: 100%; } }
@media (max-width: 960px) {
  .hero__meta .lede, .hero__meta .btn { grid-column: 1 / -1; justify-self: start; }
  .hero__meta .btn { margin-top: 28px; }
  .strip .label, .strip ul { grid-column: 1 / -1; }
  .strip .label { padding-bottom: 0; }
  .list__n { grid-column: 1 / span 2; }
  .list h3 { grid-column: 3 / -1; }
  .list p { grid-column: 3 / -1; margin-top: 8px; }
  .statement p, .apps__inner, .compare__table { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .hero .eyebrow b { display: none; }
  .strip ul { grid-template-columns: 1fr 1fr; }
  .strip li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .list li { display: block; }
  .list__n { display: block; margin-bottom: 8px; padding-top: 0; }
  .apps__inner { grid-template-columns: 1fr; }
  .app, .app + .app { padding: 24px 0; border-left: 0; }
  .app + .app { border-top: 1px solid var(--rule); }
  .app .label { margin-bottom: 16px; }
  .compare__head { display: none; }
  .compare__row { grid-template-columns: 1fr; row-gap: 14px; }
  .compare__row > div:nth-child(2)::before { content: "Today"; }
  .compare__row > div:nth-child(3)::before { content: "With Packet"; }
  .compare__row > div:nth-child(n+2)::before { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li, .steps li:nth-child(3) { padding: 20px 0 0; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--night-rule); margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero .eyebrow, .hero .display, .hero__meta, .hero__stage { animation: none; }
  .wire span::after { animation: none; display: none; }
  .story__copy, .story__visual > * { transition: none; }
}
