/* =========================================================
   oceanmagicframe.com — "DEEP FIELD LOG"
   Hero: full-bleed cinematic frame, masthead floated over it,
   copy anchored to the bottom-left with a depth-gauge rule.
   Article: a field-log grid — plate numeral hangs in the
   margin and travels with its entry, heading leads, image
   follows, paragraph closes. Quotes cut to abyss-dark bands.
   Type: Petrona (display serif) / Figtree (text)
   ========================================================= */

:root{
  --abyss:#0B0C2A;
  --deep:#1B1D5A;
  --deep-2:#2A2C74;
  --teal:#333586;
  --teal-lt:#4A4DAF;
  --aqua:#EFA0A0;
  --foam:#F0F0F8;
  --sand:#FBF4F4;
  --paper:#FFFFFF;
  --ink:#161738;
  --body-text:#4A4C66;
  --muted:#7B7D95;
  --line:#E5E5EF;
  --line-2:#CDCDE0;

  --shell:1180px;
  --measure:660px;
  --gutter:clamp(18px,4vw,40px);

  --display:"Petrona",Georgia,serif;
  --text:"Figtree",system-ui,-apple-system,sans-serif;
}

*,*::before,*::after{box-sizing:border-box}
html,body{max-width:100%;overflow-x:hidden}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{
  margin:0;background:var(--paper);color:var(--body-text);
  font-family:var(--text);font-size:17px;line-height:1.72;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;height:auto;display:block}
a{color:inherit}
h1,h2,h3{font-family:var(--display);color:var(--ink);line-height:1.16;margin:0;font-weight:600}
p{margin:0 0 1.1em}
ul,ol{margin:0;padding:0;list-style:none}
:focus-visible{outline:3px solid var(--aqua);outline-offset:3px}

.shell{max-width:var(--shell);margin-inline:auto;padding-inline:var(--gutter)}

/* =========================================================
   MASTHEAD — floated over the hero, never sticky
   ========================================================= */
/* solid light bar so the indigo logo reads against it */
.masthead{position:static;background:var(--foam);color:var(--ink);border-bottom:1px solid var(--line)}
.wordmark-logo{height:44px;width:auto}
@media (max-width:520px){.wordmark-logo{height:36px}}
.masthead-inner{
  display:flex;align-items:center;justify-content:space-between;
  gap:1.2rem;padding-block:1.1rem;flex-wrap:wrap;
}
.wordmark{
  font-family:var(--display);font-size:1.06rem;font-weight:600;
  letter-spacing:-.01em;color:#fff;text-decoration:none;
  display:inline-flex;align-items:center;gap:.5rem;
}
.wordmark .mark{
  display:grid;place-items:center;width:26px;height:26px;border-radius:50%;
  border:1.5px solid var(--aqua);color:var(--aqua);flex:none;
}
.wordmark .mark svg{width:15px;height:15px}
.wordmark em{font-style:normal;color:var(--aqua)}
.masthead-nav{display:flex;flex-wrap:wrap;gap:.35rem 1.15rem}
.masthead-nav a{
  font-size:.76rem;font-weight:500;letter-spacing:.05em;
  color:var(--body-text);text-decoration:none;
}
.masthead-nav a:hover{color:var(--teal)}

/* =========================================================
   HERO — full-bleed frame, copy anchored bottom-left
   ========================================================= */
.hero{
  position:relative;isolation:isolate;overflow:hidden;
  min-height:clamp(540px,80vh,780px);
  display:flex;align-items:flex-end;background:var(--abyss);
}
.hero-bg{position:absolute;inset:0;z-index:-2;margin:0}
.hero-bg img{width:100%;height:100%;object-fit:cover}
.hero::before{
  content:"";position:absolute;inset:0;z-index:-1;
  background:
    linear-gradient(180deg,rgba(11,12,42,.78) 0%,rgba(11,12,42,.10) 26%,rgba(11,12,42,0) 42%),
    linear-gradient(0deg,rgba(11,12,42,.94) 0%,rgba(11,12,42,.72) 30%,rgba(11,12,42,.12) 66%,rgba(11,12,42,0) 100%);
}
.hero-inner{width:100%;padding-block:clamp(46px,8vw,86px)}
.eyebrow{
  display:flex;align-items:center;gap:.85rem;margin:0 0 1.3rem;
  color:var(--aqua);font-size:.68rem;font-weight:600;
  letter-spacing:.24em;text-transform:uppercase;
}
.eyebrow::before{content:"";width:clamp(28px,6vw,64px);height:1px;background:var(--aqua);flex:none}
.hero h1{
  color:#fff;font-size:clamp(2.15rem,6.2vw,4.5rem);
  letter-spacing:-.028em;line-height:1.03;
  max-width:16ch;margin:0 0 1.5rem;
  text-shadow:0 2px 26px rgba(0,0,0,.34);
}
.hero-meta{
  display:flex;flex-wrap:wrap;align-items:center;gap:.5rem 1rem;margin:0;
  font-size:.8rem;letter-spacing:.04em;color:rgba(255,255,255,.78);
}
.hero-meta span{display:inline-flex;align-items:center;gap:1rem}
.hero-meta span + span::before{
  content:"";width:1px;height:11px;background:rgba(239,160,160,.5);display:inline-block;
}

/* depth-gauge ticks down the right edge of the hero */
.hero-gauge{
  position:absolute;right:var(--gutter);top:50%;transform:translateY(-50%);
  z-index:2;display:flex;flex-direction:column;align-items:flex-end;gap:.55rem;
  font-size:.6rem;letter-spacing:.16em;color:rgba(239,160,160,.62);
}
.hero-gauge i{display:block;height:1px;background:rgba(239,160,160,.42);font-style:normal}
.hero-gauge i:nth-child(odd){width:14px}
.hero-gauge i:nth-child(even){width:26px}
.hero-gauge b{font-weight:500;color:rgba(239,160,160,.85)}

/* =========================================================
   BODY GRID — depth rail + field log
   ========================================================= */
.body-grid{
  display:grid;grid-template-columns:216px minmax(0,1fr);
  gap:clamp(28px,5vw,76px);align-items:start;
  padding-block:clamp(38px,5.5vw,68px) clamp(48px,7vw,94px);
}

/* --- depth rail (contents) --- */
.toc{position:sticky;top:24px}
.toc-title{
  margin:0 0 1rem;font-size:.64rem;font-weight:700;letter-spacing:.22em;
  text-transform:uppercase;color:var(--muted);
}
.toc-track{position:relative;padding-left:1.1rem}
.toc-track::before{
  content:"";position:absolute;left:0;top:.35rem;bottom:.35rem;width:2px;
  background:var(--line);border-radius:2px;
}
.toc-progress{
  position:absolute;left:0;top:.35rem;width:2px;height:0;
  background:linear-gradient(180deg,var(--teal-lt),var(--teal));
  border-radius:2px;transition:height .12s linear;
}
.toc-list{display:flex;flex-direction:column}
.toc-list a{
  position:relative;display:flex;gap:.5rem;align-items:baseline;
  padding:.34rem 0;font-size:.81rem;line-height:1.4;
  color:var(--muted);text-decoration:none;transition:color .16s ease;
}
.toc-list a::before{
  content:"";position:absolute;left:-1.1rem;top:.82em;
  width:7px;height:2px;background:var(--line-2);transition:background .16s ease,width .16s ease;
}
.toc-list a span{
  font-family:var(--display);font-size:.72rem;font-weight:600;
  color:var(--teal-lt);flex:none;
}
.toc-list a:hover{color:var(--ink)}
.toc-list a.is-active{color:var(--ink);font-weight:600}
.toc-list a.is-active::before{background:var(--teal);width:12px}

/* --- article --- */
.article{max-width:var(--measure)}

/* standfirst intro — no drop cap, a rule instead */
.intro{
  border-left:3px solid var(--teal);padding-left:clamp(1rem,2.4vw,1.5rem);
  margin-bottom:clamp(10px,2vw,18px);
}
.intro p{font-size:clamp(1.05rem,1.9vw,1.2rem);line-height:1.62;color:var(--ink)}
.intro p:last-child{margin-bottom:0;color:var(--body-text);font-size:1.02rem}

/* field-log entries: numeral hangs in the margin and travels */
.find{
  display:grid;grid-template-columns:clamp(52px,7vw,76px) minmax(0,1fr);
  gap:0 clamp(12px,2vw,22px);
  margin:clamp(30px,4.4vw,48px) 0 0;
  padding-top:clamp(22px,3.2vw,32px);
  border-top:1px solid var(--line);
  scroll-margin-top:24px;
}
.find-index{
  font-family:var(--display);font-weight:600;line-height:.9;
  font-size:clamp(1.7rem,3.4vw,2.6rem);letter-spacing:-.03em;
  color:var(--teal-lt);
  position:sticky;top:26px;align-self:start;
}
@supports (-webkit-text-stroke:1px currentColor){
  .find-index{color:transparent;-webkit-text-stroke:1.4px var(--teal-lt)}
}
.find-index::after{
  content:"";display:block;width:20px;height:2px;background:var(--foam);margin-top:.55rem;
}
.find h2{
  font-size:clamp(1.28rem,2.5vw,1.7rem);letter-spacing:-.018em;
  margin:0 0 1rem;
}
.find-media{margin:0 0 1.15rem;border-radius:3px;overflow:hidden;background:var(--foam)}
.find-media img{
  width:100%;height:clamp(198px,29vw,330px);object-fit:cover;
  transition:transform .5s ease;
}
.find:hover .find-media img{transform:scale(1.025)}
.find p{margin:0}

/* --- quote bands: abyss, ruled --- */
.quote-band{
  width:100vw;position:relative;left:50%;transform:translateX(-50%);
  background:var(--abyss);color:#fff;
  margin:clamp(40px,5.8vw,68px) 0;
  padding:clamp(2rem,4.4vw,3.2rem) var(--gutter);
  border-block:1px solid rgba(239,160,160,.28);
}
.quote-band blockquote{
  margin:0 auto;max-width:780px;position:relative;
  padding-left:clamp(2.6rem,5vw,3.8rem);
}
.quote-band blockquote::before{
  content:"\201C";position:absolute;left:0;top:-.2em;
  font-family:var(--display);font-size:clamp(3.6rem,7.5vw,5.4rem);line-height:1;
  color:var(--aqua);opacity:.55;
}
.quote-band p{
  margin:0;font-family:var(--display);font-weight:500;
  font-size:clamp(1.14rem,2.4vw,1.55rem);line-height:1.4;color:#fff;
}

/* --- closing sections --- */
.closing{
  margin:clamp(38px,5.4vw,60px) 0 0;padding-top:clamp(22px,3.2vw,32px);
  border-top:1px solid var(--line);scroll-margin-top:24px;
}
.closing h2{
  font-size:clamp(1.34rem,2.6vw,1.78rem);margin:0 0 .9rem;
  display:flex;align-items:center;gap:.75rem;
}
.closing h2::after{content:"";flex:1;height:1px;background:var(--foam)}

/* =========================================================
   TWO-STEP SIGNUP
   ========================================================= */
.signup{background:var(--sand);border-top:1px solid var(--line);padding-block:clamp(40px,6vw,76px)}
.signup-card{
  max-width:640px;margin-inline:auto;background:var(--paper);
  border:1px solid var(--line-2);border-radius:12px;
  padding:clamp(1.4rem,3.6vw,2.4rem);text-align:center;
}
.stepper{
  display:flex;align-items:center;justify-content:center;gap:.7rem;
  margin-bottom:1.4rem;flex-wrap:wrap;
}
.step{display:inline-flex;align-items:center;gap:.45rem;font-size:.78rem;font-weight:600;color:var(--muted)}
.step i{
  font-style:normal;display:grid;place-items:center;width:22px;height:22px;
  border-radius:50%;border:1.5px solid var(--line-2);
  font-size:.72rem;color:var(--muted);background:var(--paper);
}
.step.is-on{color:var(--ink)}
.step.is-on i{background:var(--teal);border-color:var(--teal);color:#fff}
.step-rule{width:34px;height:1.5px;background:var(--line-2);flex:none}

.signup h2{font-size:clamp(1.3rem,2.8vw,1.85rem);margin:0 0 .7rem;letter-spacing:-.015em}
.signup-sub{margin:0 0 1.4rem;font-size:.98rem;color:var(--body-text)}
.signup-form{display:flex;gap:.6rem;flex-wrap:wrap;justify-content:center}
.signup-form input[type=email]{
  flex:1 1 260px;min-width:0;font-family:var(--text);font-size:1rem;color:var(--ink);
  border:1.5px solid var(--line-2);border-radius:8px;padding:.78rem .95rem;background:var(--paper);
}
.signup-form input[type=email]:focus{border-color:var(--teal);outline:none;box-shadow:0 0 0 3px rgba(51,53,134,.16)}
.signup-form input[type=email][aria-invalid=true]{border-color:#C2445E;background:#FFFAFA}
.signup-form button{
  flex:0 0 auto;cursor:pointer;font-family:var(--text);font-weight:700;font-size:.95rem;
  background:var(--teal);color:#fff;border:1.5px solid var(--teal);
  border-radius:8px;padding:.78rem 1.6rem;
  transition:background .16s ease,border-color .16s ease;
}
.signup-form button:hover{background:var(--deep-2);border-color:var(--deep-2)}
.signup-err{display:block;margin-top:.7rem;font-size:.85rem;color:#C2445E}
.signup-note{margin:1rem 0 0;font-size:.78rem;color:var(--muted)}

.signup-done{text-align:center}
.done-mark{
  display:grid;place-items:center;width:52px;height:52px;border-radius:50%;
  background:var(--teal);color:#fff;margin:0 auto 1rem;
}
.done-mark svg{width:26px;height:26px}
.signup-done p{margin:0;font-size:1rem;color:var(--body-text)}
[hidden]{display:none !important}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer{background:var(--abyss);color:#A2A3BC;padding-block:clamp(32px,4.5vw,52px)}
.footer-inner{display:grid;gap:1.2rem;justify-items:center;text-align:center}
.footer-nav{display:flex;flex-wrap:wrap;justify-content:center;gap:.45rem 1.4rem}
.footer-nav a{font-size:.8rem;color:#B4B5CB;text-decoration:none}
.footer-nav a:hover{color:var(--aqua);text-decoration:underline;text-underline-offset:3px}
.footer-rule{width:100%;max-width:560px;height:1px;background:rgba(239,160,160,.2)}
.footer-site{margin:0;font-weight:700;color:#fff;font-size:.9rem}
.footer-inner p{margin:0;font-size:.83rem}
.footer-inner a[href^="mailto"]{color:var(--aqua)}
.footer-copy{color:#787A96 !important;font-size:.78rem !important}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width:900px){
  .body-grid{grid-template-columns:minmax(0,1fr)}
  .toc{position:static;order:-1;background:var(--sand);border-radius:10px;padding:1.1rem 1.2rem}
  .toc-track{padding-left:1rem}
  .toc-list{display:grid;grid-template-columns:1fr 1fr;column-gap:1rem}
  .article{max-width:none}
  .hero-gauge{display:none}
}
@media (max-width:560px){
  body{font-size:16px}
  .masthead-inner{justify-content:center;text-align:center;gap:.5rem}
  .masthead-nav{justify-content:center;gap:.3rem .8rem}
  .hero{min-height:clamp(480px,74vh,620px)}
  .toc-list{grid-template-columns:1fr}
  .find{grid-template-columns:minmax(0,1fr);gap:0}
  .find-index{position:static;margin-bottom:.7rem}
  .find-index::after{display:none}
  .signup-form button{flex:1 1 100%}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .find:hover .find-media img{transform:none}
  .toc-progress{transition:none}
}
