/* Safety — a calm editorial page: duotone rider hero, three habit rows, the campaign band,
   handling steps lit along a gold line, the workplace value on paper, and a sunrise CTA. */

/* ---------- Hero ---------- */
.sf-hero { min-height: min(92vh, 900px); }
.sf-hero__frame { background: var(--ink-2); }
.sf-hero__frame::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(60% 55% at 62% 110%, rgba(230, 173, 46, .14), transparent 65%);
}
.sf-hero__media { position: absolute; top: 0; right: 0; bottom: 0; width: clamp(340px, 42%, 620px); margin: 0; z-index: 0; overflow: hidden; }
.sf-hero__media img {
  position: absolute; left: 0; top: -6%; width: 100%; height: 112%; max-width: none;
  object-fit: cover; object-position: 50% 30%;
  filter: grayscale(1) contrast(1.15) brightness(.95);
}
/* gold-on-ink duotone, then a fade into the frame on the copy side */
.sf-hero__media::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: multiply;
  background: linear-gradient(172deg, var(--gold-2) 0%, var(--gold) 34%, #6b4208 72%, var(--gold-deep) 100%);
}
.sf-hero__media::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(90deg, var(--ink-2) 0%, rgba(19, 19, 21, .55) 24%, rgba(19, 19, 21, 0) 58%),
    linear-gradient(0deg, rgba(19, 19, 21, .8) 0%, rgba(19, 19, 21, 0) 32%);
}
.sf-hero__tag {
  position: absolute; right: clamp(16px, 2vw, 28px); top: 50%; z-index: 3; margin: 0;
  writing-mode: vertical-rl; transform: translateY(-50%) rotate(180deg);
  color: rgba(242, 238, 230, .7); letter-spacing: .3em;
}
.sf-hero .phero__content { z-index: 2; }
.sf-hero__copy { max-width: min(64%, 900px); }
.sf-hero h1 { max-width: 12ch; font-size: clamp(3.4rem, 7.6vw, 8.2rem); }
.sf-hero__foot { position: relative; max-width: 58%; }
.sf-hero__foot::after {
  content: ""; position: absolute; left: 0; top: -1px; width: 100%; height: 1px;
  background: linear-gradient(90deg, var(--gold), rgba(230, 173, 46, 0));
  transform-origin: 0 50%; transition: transform 2s .4s var(--ease-io);
}
html.js .sf-hero__foot:not(.in)::after { transform: scaleX(0); }
.sf-hero__jump { justify-self: end; white-space: nowrap; }
.sf-hero__jump .ic { transform: rotate(90deg); }

/* ---------- Three habits ---------- */
.sf-habits__list { border-top: 1px solid var(--rule); }
.sf-habit {
  position: relative; display: grid; grid-template-columns: 80px minmax(0, 1fr) minmax(0, 400px);
  gap: 16px clamp(24px, 4vw, 64px); align-items: end;
  padding-block: clamp(30px, 4.4vw, 56px); border-bottom: 1px solid var(--rule);
}
.sf-habit::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px;
  background: linear-gradient(90deg, var(--gold), rgba(230, 173, 46, 0) 75%);
  transform-origin: 0 50%; transition: transform 1.8s .25s var(--ease-io);
}
html.js .sf-habit:not(.in)::before { transform: scaleX(0); }
.sf-habit__num { align-self: start; padding-top: 1.4em; color: var(--gold); }
.sf-habit__t { font-size: clamp(3rem, 8.6vw, 8.2rem); line-height: .92; letter-spacing: -.025em; transition: transform .9s var(--ease-out); }
.sf-habit__t em { font-style: italic; color: var(--red); }
.sf-habit__body p { margin: 0; color: var(--mute-2); }
.sf-habit__body .sf-habit__tag { margin-bottom: 12px; color: var(--bone); }
.sf-habit__body .sf-habit__pull { margin-top: 18px; font-size: clamp(1.4rem, 2vw, 1.75rem); line-height: 1.15; color: var(--bone); }
.sf-habit__pull em { font-style: italic; color: var(--red); }
@media (hover: hover) and (pointer: fine) {
  .sf-habit:hover .sf-habit__t { transform: translateX(16px); }
}

/* ---------- Campaign band ---------- */
.sf-banner__frame { background: var(--ink); }
.sf-banner__frame img { width: 100%; }
.sf-banner__cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 12px; color: var(--mute); }
.sf-banner__cap span:first-child { color: var(--gold); }

/* ---------- Handling the oil ---------- */
.sf-care__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(48px, 7vw, 120px); align-items: start; }
.sf-care__aside { align-self: stretch; }
.sf-care__aside .h2 { font-size: clamp(2.4rem, 4.2vw, 4rem); max-width: 11ch; margin-bottom: 26px; }
.sf-care__aside .lead { margin-bottom: 0; }
/* sticky only where the whole column (heading, lead, bottle) fits under the header */
@media (min-width: 1001px) and (min-height: 920px) {
  .sf-care__sticky { position: sticky; top: calc(var(--hdr) + 36px); }
}

/* the back label, with a callout on the printed warning */
.sf-label { position: relative; width: min(100%, 250px); aspect-ratio: 4 / 5; margin: clamp(24px, 3vw, 40px) 0 0; }
.sf-label::before { content: ""; position: absolute; inset: 14% 4% 4%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(230, 173, 46, .16), transparent); }
.sf-label img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 28px 34px rgba(0, 0, 0, .55)); }
.sf-label__call { position: absolute; left: 68%; top: 67%; display: flex; align-items: center; gap: 0; transform: translateY(-50%); pointer-events: none; }
.sf-label__dot { position: relative; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(225, 38, 44, .25); }
.sf-label__dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--red); opacity: 0; animation: sf-ping 2.8s var(--ease-out) infinite; }
@keyframes sf-ping { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
.sf-label__lead { flex: none; width: clamp(28px, 4vw, 60px); height: 1px; background: var(--gold); }
.sf-label__call .mono { width: 19ch; padding-left: 12px; color: var(--bone); font-size: 10.5px; line-height: 1.5; }

/* the step track: a hairline, a gold fill that follows your reading, and a glowing tip */
.sf-track { --node: 76px; position: relative; }
.sf-track__line {
  position: absolute; left: calc(var(--node) / 2 - .5px); width: 1px;
  top: var(--line-top, calc(var(--node) / 2)); height: var(--line-h, calc(100% - var(--node)));
  background: var(--rule-2);
}
.sf-track__fill { position: absolute; inset: 0; background: linear-gradient(180deg, var(--gold-2), var(--gold)); transform-origin: top; transform: scaleY(var(--p, 1)); }
.sf-track__tip {
  position: absolute; left: 50%; top: calc(var(--p, 1) * 100%); width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%;
  background: var(--gold-2); box-shadow: 0 0 0 4px rgba(230, 173, 46, .18), 0 0 22px 4px rgba(230, 173, 46, .45);
  opacity: 0; transition: opacity .5s;
}
.sf-track.is-live .sf-track__tip { opacity: 1; }
.sf-steps { position: relative; display: grid; gap: clamp(44px, 6vw, 84px); }
.sf-step { display: grid; grid-template-columns: var(--node) minmax(0, 1fr); gap: 0 clamp(20px, 3vw, 40px); align-items: start; }
.sf-step__node {
  position: relative; z-index: 1; display: grid; place-items: center; width: var(--node); height: var(--node); border-radius: 50%;
  background: var(--ink); border: 1px solid rgba(230, 173, 46, .55);
  box-shadow: 0 0 0 6px rgba(230, 173, 46, .05), 0 0 40px rgba(230, 173, 46, .16);
  transition: border-color .7s var(--ease-out), box-shadow .9s var(--ease-out);
}
.sf-ic { width: 56%; height: 56%; overflow: visible; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sf-ic > :nth-child(2) { --d: 2; }
.sf-ic > :nth-child(3) { --d: 4; }
.sf-ic > :nth-child(n+4) { --d: 6; }
html:not(.js) .sf-ic :is(path, line, circle, rect, polyline, ellipse) { stroke-dashoffset: 0; }
.sf-step__body { padding-top: 6px; }
.sf-step__num { display: block; margin-bottom: 12px; color: var(--gold); transition: color .6s; }
.sf-step__t { font-size: clamp(1.9rem, 3.1vw, 2.8rem); line-height: 1.04; letter-spacing: -.012em; max-width: 17ch; margin-bottom: 14px; transition: color .6s var(--ease-out); }
.sf-step__t em { font-style: italic; color: var(--red); }
.sf-step p { margin: 0; max-width: 48ch; color: var(--mute-2); transition: color .6s var(--ease-out); }

/* the first rule carries the page's one red accent */
.sf-step--key .sf-step__t { font-size: clamp(2.4rem, 4.6vw, 4.1rem); max-width: 12ch; }
.sf-step--key .sf-step__num { color: var(--red-2); }
.sf-step--key .sf-step__node { border-color: rgba(225, 38, 44, .7); box-shadow: 0 0 0 6px rgba(225, 38, 44, .07), 0 0 44px rgba(225, 38, 44, .2); }
.sf-step--key p { color: var(--bone); }

/* scroll-driven state (only once JS takes over; without it every step is lit) */
.sf-track.is-live .sf-step:not(.is-lit) .sf-step__node { border-color: var(--rule-2); box-shadow: none; }
.sf-track.is-live .sf-step:not(.is-lit) .sf-step__num,
.sf-track.is-live .sf-step:not(.is-lit) .sf-step__t,
.sf-track.is-live .sf-step:not(.is-lit) .sf-step__t em,
.sf-track.is-live .sf-step:not(.is-lit) p { color: var(--mute); }
.sf-track.is-live .sf-step:not(.is-lit) .sf-ic :is(path, line, circle, rect, polyline, ellipse) { stroke-dashoffset: 1; }

/* idle micro-motion once a step is lit */
.sf-idle { transform-box: fill-box; transform-origin: 50% 50%; }
@media (prefers-reduced-motion: no-preference) {
  .sf-step.is-lit .sf-idle--bob { animation: sf-bob 3.6s 1.8s var(--ease-io) infinite; }
  .sf-step.is-lit .sf-idle--drip { animation: sf-drip 2.8s 1.8s var(--ease-io) infinite; }
  .sf-step.is-lit .sf-idle--rise { animation: sf-rise 3.2s 1.8s var(--ease-io) infinite; }
  .sf-step.is-lit .sf-idle--blink { animation: sf-blink 4.6s 2s var(--ease-io) infinite; }
  .sf-step.is-lit .sf-idle--heat { animation: sf-heat 2.6s 1.8s var(--ease-io) infinite; }
}
@keyframes sf-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.5px); } }
@keyframes sf-drip { 0%, 30% { transform: translateY(0); opacity: 1; } 75% { transform: translateY(3px); opacity: .2; } 100% { transform: translateY(0); opacity: 1; } }
@keyframes sf-rise { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-2.5px); opacity: .5; } }
@keyframes sf-blink { 0%, 90%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.12); } }
@keyframes sf-heat { 0%, 100% { transform: translateY(0); opacity: .9; } 50% { transform: translateY(-2px); opacity: .35; } }

/* ---------- At work (paper) ---------- */
.sf-work { margin: var(--inset); border-radius: var(--radius); }
.sf-work__quote { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px 64px; padding-bottom: clamp(64px, 9vw, 120px); border-bottom: 1px solid rgba(22, 19, 15, .14); }
.sf-work__meta { grid-column: 1; grid-row: 1 / span 2; }
.sf-work__num { display: block; font-size: clamp(5rem, 9vw, 9rem); line-height: .8; letter-spacing: -.03em; color: rgba(168, 112, 10, .5); }
.sf-work__q { grid-column: 2; margin: 0; font-size: clamp(2.3rem, 5.4vw, 5.4rem); line-height: 1.02; letter-spacing: -.02em; max-width: 17ch; }
.sf-work__link { grid-column: 2; justify-self: start; color: var(--paper-ink); }
.sf-work__link:hover { color: #8a5a06; }
.sf-work__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); gap: 32px 64px; padding-top: clamp(56px, 8vw, 100px); align-items: start; }
.sf-work__grid .h2 { max-width: 10ch; }
.sf-work__grid .lead { margin-bottom: 32px; }

/* ---------- CTA: a slow sunrise ---------- */
.sf-cta__frame { background: var(--ink-2); }
.sf-cta__sun {
  position: absolute; left: 50%; bottom: 0; z-index: -1; width: min(130vw, 1500px); aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(246, 207, 110, .32), rgba(230, 173, 46, .14) 42%, rgba(58, 36, 5, .1) 62%, transparent 74%);
  transform: translate(-50%, calc(64% + (1 - var(--rise, 1)) * 16%)); transition: transform .9s var(--ease-out);
}
.sf-cta__horizon { position: absolute; left: 6%; right: 6%; bottom: 20%; z-index: -1; height: 1px; background: linear-gradient(90deg, transparent, rgba(230, 173, 46, .5), transparent); }
.sf-cta .lead { margin: 0 auto 40px; }
.sf-cta__lines { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 28px; margin-top: 36px; color: var(--mute-2); }
.sf-cta__lines a { display: inline-block; padding-block: 8px; transition: color .3s; }
.sf-cta__lines a:hover { color: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .sf-care__grid { grid-template-columns: 1fr; }
  .sf-care__aside .h2 { max-width: 14ch; }
  .sf-habit { grid-template-columns: 56px minmax(0, 1fr); }
  .sf-habit__body { grid-column: 2; max-width: 520px; }
  .sf-work__grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sf-hero { min-height: min(100svh, 900px); padding-top: calc(var(--hdr) + 60px); }
  .sf-hero__media { left: 0; width: auto; bottom: 26%; }
  /* the copy sits over the lower image (the bright gold horizon), so the ink veil climbs higher here */
  .sf-hero__media::after { background: linear-gradient(0deg, var(--ink-2) 0%, rgba(19, 19, 21, .9) 30%, rgba(19, 19, 21, .58) 62%, rgba(19, 19, 21, .12) 100%); }
  .sf-hero__tag { display: none; }
  .sf-hero__copy, .sf-hero__foot { max-width: none; }
  .sf-hero__jump { justify-self: start; }
  .sf-work__quote { grid-template-columns: 1fr; }
  .sf-work__meta { grid-row: auto; display: flex; align-items: center; justify-content: space-between; }
  .sf-work__meta .eyebrow { margin: 0; }
  .sf-work__num { font-size: 4rem; }
  .sf-work__q, .sf-work__link { grid-column: 1; }
}
@media (max-width: 640px) {
  .sf-track { --node: 56px; }
  .sf-step { gap: 0 18px; }
  .sf-habit { grid-template-columns: 1fr; gap: 10px; }
  .sf-habit__num { padding-top: 0; }
  .sf-habit__body { grid-column: 1; }
  .sf-label { width: min(64%, 240px); aspect-ratio: auto; }
  .sf-label img { height: auto; }
  .sf-label__call { position: static; transform: none; margin-top: 14px; }
  .sf-label__lead { width: 28px; }
  .sf-label__call .mono { width: auto; }
}
