/* ==========================================================================
   /defense/ page-scoped styles. The same four lines the homepage carried in an
   accordion, promoted to one full section each: on an explainer page hiding
   three quarters of the content is the wrong trade. Tokens, type, and the
   .phone component come from /styles.css; nothing here adds a color or face.
   ========================================================================== */

/* ---- Breadcrumb (mirrors buy.css / start.css .crumb) ---- */
.crumb { font-family: var(--sans); font-size: 0.9375rem; margin-bottom: 1.5rem; }
.crumb a { color: var(--taupe); text-decoration: none; }
.crumb a:hover { color: var(--amber-ink); }

.defense-hero { padding-block: clamp(2.5rem, 6vw, 4rem) clamp(2.5rem, 6vw, 4.5rem); }
.defense-hero .lede { margin-top: 1.5rem; max-width: 46rem; }

/* One line per row: copy on one side, its screen on the other, sides
   alternating down the page (--flip). Sizes are asymmetric so the copy column
   always holds the wider share. */
.defense-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  max-width: 66rem;
}
.defense-line--flip .defense-row { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); }
.defense-line--flip .defense-copy { grid-column: 2; grid-row: 1; }
.defense-line--flip .defense-media { grid-column: 1; grid-row: 1; }

.defense-media {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.defense-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
/* Below the page h1, above body: four peers, none of them the page title. */
.defense-head h2 { font-size: clamp(1.75rem, 2.8vw, 2.25rem); margin-bottom: 0; }
/* The numeral reads as a ladder rung, filled from the start: nothing on this
   page is ever the collapsed line. */
.defense-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  flex: none;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
}
.defense-copy p { max-width: 46ch; }

/* Every line closes on the same refrain, so the cost of undoing reads as a
   rising scale 1 through 4, the product principle that accessibility scales
   inversely with severity. The rule above it makes the refrain the row's
   last word rather than one more paragraph. */
.defense-way {
  margin-top: 1.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--hairline);
  max-width: 46ch;
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--taupe);
}
.defense-way strong { font-weight: 600; color: var(--ink); }

/* Screenshot pairs: the earlier moment sits behind-left, the later moment
   front-right, so each pair reads in order like the copy beside it. */
.defense-pair {
  display: grid;
  justify-items: center;
  align-items: center;
  padding-block: 0.5rem;
}
.defense-pair .phone { grid-area: 1 / 1; }
.defense-pair .phone:first-child {
  width: min(200px, 42vw);
  transform: translate(-36%, -4%);
}
.defense-pair .phone:last-child {
  width: min(218px, 46vw);
  transform: translate(31%, 5%);
  z-index: 2;
  box-shadow: 0 22px 48px rgba(38, 34, 30, 0.28);
}

/* The last line lives away from the phone, so its frame is a browser card,
   not a bezel. */
.defense-browser {
  width: 100%;
  max-width: 26rem;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 44px color-mix(in srgb, var(--ink) 10%, transparent);
}
.defense-browser__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--hairline);
}
.defense-browser__bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hairline);
}
.defense-browser__url {
  flex: 1;
  margin-left: 0.4rem;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  background: var(--gray-field);
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--taupe);
  text-align: center;
}
.defense-browser__shot {
  display: block;
  width: 100%;
  height: auto;
}

/* ---- Lines 2 & 3: the real screens rebuilt live, not videos. Copy, type
   roles, and timing are lifted verbatim from the phone sources
   (PauseGateActivity / PauseCopy / SetAsideUi); sizes are the real dp values
   at mock scale (412 dp phone → ~250 px screen, ×0.6). Both wear the default
   family's night face (t-paper-dark); the disc amber is AdesseBrand.marigold,
   the signature-moment color on dark faces. ---- */
.st-phone, .aside-phone { --amber: #E8A13C; }

/* The gate: dwell and choice stacked in one cell; the one-shot animations
   below cross between them, exactly like the activity's Crossfade. */
.st-gate { flex: 1; min-height: 0; display: grid; }
.st-dwell,
.st-choice {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-inline: 1.05rem;          /* 28 dp */
  min-height: 0;
}
/* Compose's weight(0.5) above the headline, weight(1) below the disc. */
.st-dwell::before { content: ""; flex: 0.5 0 0; }
.st-dwell::after  { content: ""; flex: 1 0 0; }
.st-headline {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.375rem;              /* displaySmall 36 sp */
  line-height: 1.22;
  color: var(--screen-ink);
  text-align: center;
  margin-bottom: 1.65rem;           /* 44 dp */
}
.st-breath { position: relative; width: 131px; height: 131px; flex: none; } /* 216 dp */
.st-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--amber) 50%, transparent);
  background: radial-gradient(circle,
    color-mix(in srgb, var(--amber) 18%, transparent) 0%,
    color-mix(in srgb, var(--amber) 5%, transparent) 100%);
  transform: scale(0.72);           /* starts exhaled, so breath one visibly expands */
}
/* Both cue layers fill the disc and center identically, so the glyphs never
   shift as one fades through the other (the phone's own fix). */
.st-cue {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: 0.9rem;           /* 24 dp */
  font-family: var(--serif);
  font-weight: 500;
  font-size: 0.625rem;              /* titleMedium 16 sp */
  color: var(--screen-secondary);
  text-align: center;
}
.st-cue--out { opacity: 0; }
.st-choice { opacity: 0; padding-top: 1.8rem; } /* 48 dp below the status bar */
.st-mark {
  position: relative;
  width: 32px;                      /* the 64 dp disc at rest (scale 0.82) */
  height: 32px;
  flex: none;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--amber) 50%, transparent);
  background: radial-gradient(circle,
    color-mix(in srgb, var(--amber) 18%, transparent) 0%,
    color-mix(in srgb, var(--amber) 5%, transparent) 100%);
}
.st-mark::after {                   /* the still core dot: the fixation anchor */
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 2px;
  margin: -1px 0 0 -1px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--amber) 95%, transparent);
}
.st-question {
  margin: 1.375rem 0 1.05rem;       /* 36 dp above, 28 dp below */
  font-family: var(--serif);
  font-weight: 500;
  font-size: 0.9375rem;             /* headlineSmall 24 sp */
  line-height: 1.33;
  color: var(--screen-ink);
  text-align: center;
}
.st-reason {
  width: 100%;
  min-height: 1.5rem;               /* 40 dp button */
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--screen-hairline);
  border-radius: 999px;
  margin-bottom: 0.45rem;           /* 12 dp */
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.5625rem;             /* labelLarge 14 sp */
  color: var(--screen-ink);
}
.st-nevermind {
  margin-top: 0.375rem;             /* 16 dp incl. the last reason's gap */
  min-height: 1.5rem;
  display: flex;
  align-items: center;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.5625rem;
  color: var(--screen-secondary);
}
/* One run: breathe in 4 s, out 6 s (easeInOutSine both ways), cue cross at the
   4 s turn (350 ms), dwell→choice cross at 10 s (600 ms), then rest on the
   question. .is-running is applied once, when the gate scrolls into view. */
.st-phone.is-running .st-disc     { animation: st-breath 10s both; }
.st-phone.is-running .st-cue--in  { animation: st-hide 350ms ease 4s both; }
.st-phone.is-running .st-cue--out { animation: st-show 350ms ease 4s both; }
.st-phone.is-running .st-dwell    { animation: st-hide 600ms ease 10s both; }
.st-phone.is-running .st-choice   { animation: st-show 600ms ease 10s both; }
@keyframes st-breath {
  0%   { transform: scale(0.72); animation-timing-function: cubic-bezier(0.37, 0, 0.63, 1); }
  40%  { transform: scale(1);    animation-timing-function: cubic-bezier(0.37, 0, 0.63, 1); }
  100% { transform: scale(0.72); }
}
@keyframes st-show { from { opacity: 0; } to { opacity: 1; } }
@keyframes st-hide { from { opacity: 1; } to { opacity: 0; } }

/* Line 3: the Set aside block screen, a still and centered brand moment. */
.aside-block {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;                /* 40 dp */
  text-align: center;
}
.aside-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1rem;                  /* 26 sp */
  line-height: 1.3;
  color: var(--screen-ink);
}
.aside-when {
  margin-top: 0.55rem;              /* 14 dp */
  font-family: var(--serif);
  font-size: 0.75rem;               /* 20 sp */
  color: var(--screen-secondary);
}
.aside-note {
  margin-top: 0.75rem;              /* 20 dp */
  font-family: var(--sans);
  font-size: 0.5625rem;             /* 15 sp */
  line-height: 1.5;
  color: var(--screen-secondary);
}
.aside-home {
  margin-top: 1.5rem;               /* 40 dp */
  min-height: 2.125rem;             /* 56 dp target */
  display: flex;
  align-items: center;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.625rem;              /* 17 sp */
  color: var(--screen-ink);
}

/* ---- The closing principle ---- */
.defense-close h2 { max-width: 20ch; }
.defense-close p { max-width: 52ch; }

/* One column below 860 px, media after the copy it illustrates: the words
   are the payload, the screen is the confirmation. */
@media (max-width: 860px) {
  .defense-row,
  .defense-line--flip .defense-row { grid-template-columns: 1fr; gap: 2rem; }
  .defense-line--flip .defense-copy,
  .defense-line--flip .defense-media { grid-column: 1; grid-row: auto; }
}

@media (prefers-reduced-motion: reduce) {
  /* The gate demo skips straight to its end state: the question is the
     payload, and a frozen dwell would just be a wait. */
  .st-dwell { display: none; }
  .st-choice { opacity: 1; }
  .st-phone.is-running .st-choice { animation: none; }
}
