/* ==========================================================================
   Straits Dusk - design system for Ivan Teh Business Success
   Palette grounded in Peranakan celadon, indigo and limestone.
   Display: Newsreader. Text: IBM Plex Sans.
   ========================================================================== */

:root{
  --indigo-900:#0c1a2a;
  --indigo-850:#0f2033;
  --indigo-800:#12253a;
  --indigo-700:#1b3450;
  --indigo-600:#28486a;

  --limestone:#eceee8;
  --limestone-2:#e2e5dd;
  --limestone-3:#d5d9cf;

  --jade:#2f6b5f;
  --jade-600:#3a8073;
  --jade-300:#8fbcb0;
  --sand:#c6b48c;
  --sand-dim:#9a8c6b;

  --ink:#151d27;
  --ink-soft:#465361;
  --ink-faint:#6d7986;
  --on-dark:#e7eae5;
  --on-dark-soft:#a9b6bd;

  --rule:rgba(21,29,39,.14);
  --rule-dark:rgba(231,234,229,.16);

  --wrap:1200px;
  --measure:66ch;

  --step--1:clamp(.86rem,.83rem + .14vw,.94rem);
  --step-0:clamp(1rem,.97rem + .18vw,1.09rem);
  --step-1:clamp(1.18rem,1.1rem + .38vw,1.4rem);
  --step-2:clamp(1.42rem,1.28rem + .68vw,1.85rem);
  --step-3:clamp(1.7rem,1.45rem + 1.2vw,2.5rem);
  --step-4:clamp(2.05rem,1.6rem + 2.1vw,3.4rem);
  --step-5:clamp(2.5rem,1.7rem + 3.6vw,4.6rem);

  --sp-s:clamp(2.2rem,4vw,3rem);
  --sp-m:clamp(3.4rem,6vw,5.5rem);
  --sp-l:clamp(4.6rem,8vw,8rem);
}

*,*::before,*::after{box-sizing:border-box}

html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

body{
  margin:0;
  background:var(--limestone);
  color:var(--ink);
  font-family:"IBM Plex Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  font-size:var(--step-0);
  line-height:1.72;
  font-feature-settings:"kern" 1;
  -webkit-font-smoothing:antialiased;
}

h1,h2,h3,h4{
  font-family:Newsreader,Georgia,"Times New Roman",serif;
  font-weight:400;
  line-height:1.12;
  letter-spacing:-.012em;
  margin:0 0 .6em;
  text-wrap:balance;
}
h1{font-size:var(--step-5)}
h2{font-size:var(--step-3)}
h3{font-size:var(--step-1);line-height:1.28}
h4{font-size:var(--step-0);font-family:"IBM Plex Sans",sans-serif;font-weight:600;letter-spacing:0}

p,li{max-width:var(--measure)}
p{margin:0 0 1.15em}

a{color:inherit;text-decoration-color:var(--jade);text-underline-offset:.22em;text-decoration-thickness:1px}
a:hover{text-decoration-color:currentColor}

:focus-visible{outline:2px solid var(--jade-600);outline-offset:3px;border-radius:2px}

img{max-width:100%;height:auto;display:block}

strong{font-weight:600}

.wrap{width:min(100% - 2.6rem,var(--wrap));margin-inline:auto}
/* Reading columns stay flush with the left gutter so body copy lines up
   with the page masthead rather than floating in the middle of the grid. */
.narrow{width:min(100% - 2.6rem,74ch);margin-inline:auto}
.wrap.narrow{width:min(100% - 2.6rem,var(--wrap))}
.wrap.narrow > *{max-width:74ch}

.skip{
  position:absolute;left:-9999px;top:0;z-index:100;
  background:var(--jade);color:#fff;padding:.7rem 1.1rem;
}
.skip:focus{left:.75rem;top:.75rem}

/* ---------- Header ---------------------------------------------------- */

.masthead{
  position:sticky;top:0;z-index:50;
  background:rgba(12,26,42,.94);
  backdrop-filter:saturate(160%) blur(9px);
  border-bottom:1px solid rgba(198,180,140,.2);
  color:var(--on-dark);
}
.masthead__inner{display:flex;align-items:center;gap:1.6rem;min-height:76px}

.brand{display:inline-flex;align-items:center;gap:.7rem;text-decoration:none;flex:0 0 auto}
.brand svg{display:block;height:38px;width:auto}

.nav{margin-left:auto}
.nav ul{display:flex;gap:1.55rem;list-style:none;margin:0;padding:0}
.nav li{max-width:none}
.nav a{
  text-decoration:none;font-size:.925rem;font-weight:500;letter-spacing:.005em;
  color:var(--on-dark-soft);padding:.35rem 0;display:inline-block;position:relative;
}
.nav a:hover,.nav a[aria-current="page"]{color:var(--limestone)}
.nav a[aria-current="page"]::after{
  content:"";position:absolute;left:0;right:0;bottom:-2px;height:2px;background:var(--jade-600);
}

.burger{
  display:none;margin-left:auto;background:none;border:1px solid rgba(231,234,229,.28);
  color:var(--on-dark);border-radius:3px;padding:.5rem .7rem;cursor:pointer;line-height:0;
}
.burger svg{width:20px;height:14px}

@media (max-width:930px){
  .nav{
    position:fixed;inset:76px 0 auto;background:var(--indigo-900);
    border-bottom:1px solid rgba(198,180,140,.24);
    max-height:0;overflow:hidden;transition:max-height .28s ease;
  }
  .nav[data-open="true"]{max-height:70vh;overflow:auto}
  .nav ul{flex-direction:column;gap:0;padding:.4rem 1.3rem 1.5rem}
  .nav a{display:block;padding:.85rem 0;border-bottom:1px solid rgba(231,234,229,.09);font-size:1.02rem}
  .burger{display:block}
}
@media (prefers-reduced-motion:reduce){.nav{transition:none}}

/* ---------- Bands ----------------------------------------------------- */

.band{padding:var(--sp-l) 0}
.band--tight{padding:clamp(2.6rem,5vw,4.2rem) 0 clamp(2.8rem,5vw,4.4rem)}

/* Interior page masthead: title and deck share a baseline across two columns. */
.pagehead{display:grid;grid-template-columns:1.18fr .82fr;gap:clamp(1.6rem,4vw,3.4rem);align-items:end}
.pagehead h1{margin:0;font-size:clamp(2.1rem,1.5rem + 2.4vw,3.5rem)}
.pagehead .lede{margin:0;padding-bottom:.35rem;border-left:2px solid var(--jade);padding-left:1.1rem}
@media (max-width:820px){
  .pagehead{grid-template-columns:1fr;gap:1.4rem}
  .pagehead .lede{padding-bottom:0}
}
.band--dark{background:var(--indigo-900);color:var(--on-dark)}
.band--dark h1,.band--dark h2,.band--dark h3{color:var(--limestone)}
.band--deep{background:var(--indigo-850);color:var(--on-dark)}
.band--stone{background:var(--limestone-2)}

.band--dark p,.band--deep p{color:var(--on-dark-soft)}
.band--dark a,.band--deep a{text-decoration-color:var(--jade-300)}

.lede{font-size:var(--step-1);line-height:1.6;color:var(--ink-soft);max-width:58ch}
.band--dark .lede,.band--deep .lede{color:var(--on-dark-soft)}

/* A hairline that carries the section, used instead of decorative labels. */
.section-head{
  display:grid;grid-template-columns:minmax(0,1fr);gap:.9rem;
  padding-top:1.4rem;border-top:1px solid var(--rule);margin-bottom:var(--sp-s);
}
.band--dark .section-head,.band--deep .section-head{border-top-color:var(--rule-dark)}
.section-head h2{margin:0}
.section-head p{margin:0}

/* ---------- Hero ------------------------------------------------------ */

.hero{background:var(--indigo-900);color:var(--on-dark);position:relative;overflow:hidden}
.hero::after{
  content:"";position:absolute;right:-14vw;top:-18vh;width:56vw;height:120%;
  background:radial-gradient(ellipse at 40% 40%,rgba(47,107,95,.28),transparent 62%);
  pointer-events:none;
}
.hero__grid{
  display:grid;grid-template-columns:1.06fr .94fr;gap:clamp(2rem,5vw,4.5rem);
  align-items:center;padding:clamp(3.4rem,7vw,6.4rem) 0 clamp(3rem,6vw,5.4rem);
  position:relative;z-index:1;
}
.hero h1{color:#fff;margin-bottom:.55em;font-size:clamp(2.05rem,1.35rem + 2.9vw,3.75rem);line-height:1.09}
.hero__lede{font-size:var(--step-1);color:var(--on-dark-soft);max-width:52ch;line-height:1.62}

.hero__rule{width:74px;height:2px;background:var(--jade-600);margin:0 0 1.7rem}

.hero__figure{justify-self:end;width:min(100%,450px);margin:0}
.hero__frame{position:relative;display:block}
.hero__figure img{
  border-radius:3px;
  filter:saturate(1.02) contrast(1.02);
  box-shadow:0 34px 70px -30px rgba(0,0,0,.8);
}
.hero__frame::before{
  content:"";position:absolute;inset:-20px -20px 20px 20px;
  border:1px solid rgba(198,180,140,.42);border-radius:3px;z-index:-1;
}
.hero__caption{
  margin:1.6rem 0 0;font-size:var(--step--1);color:var(--on-dark-soft);
  max-width:36ch;border-left:2px solid var(--jade);padding-left:.85rem;line-height:1.55;
}

.cta-row{display:flex;flex-wrap:wrap;gap:.85rem;margin-top:2rem}

.btn{
  display:inline-flex;align-items:center;justify-content:center;
  padding:.86rem 1.6rem;border-radius:2px;font-weight:600;font-size:.96rem;
  text-decoration:none;border:1px solid transparent;cursor:pointer;
  transition:background-color .18s ease,color .18s ease,border-color .18s ease;
}
.btn--primary{background:var(--jade);color:#fff}
.btn--primary:hover{background:var(--jade-600)}
.btn--ghost{border-color:rgba(198,180,140,.5);color:var(--limestone)}
.btn--ghost:hover{border-color:var(--sand);background:rgba(198,180,140,.1)}
.btn--ink{border-color:var(--ink);color:var(--ink)}
.btn--ink:hover{background:var(--ink);color:var(--limestone)}
@media (prefers-reduced-motion:reduce){.btn{transition:none}}

@media (max-width:900px){
  .hero__grid{grid-template-columns:1fr;gap:2.6rem}
  .hero__figure{justify-self:start;width:min(100%,390px)}
  .hero__frame::before{inset:-14px -14px 14px 14px}
}

/* ---------- The three stage framework (a genuine sequence) ------------ */

.ladder{list-style:none;margin:0;padding:0;display:grid;gap:0}
.ladder li{
  max-width:none;display:grid;grid-template-columns:auto minmax(0,1fr);
  gap:clamp(1.2rem,3vw,2.6rem);padding:2rem 0;border-top:1px solid var(--rule-dark);
}
.ladder li:last-child{border-bottom:1px solid var(--rule-dark)}
.ladder__num{
  font-family:Newsreader,serif;font-size:var(--step-2);color:var(--sand);
  line-height:1;padding-top:.18em;font-variant-numeric:tabular-nums;
}
.ladder h3{margin-bottom:.45em;color:var(--limestone)}
.ladder p:last-child{margin-bottom:0}

/* ---------- Cards / grids -------------------------------------------- */

.grid{display:grid;gap:clamp(1.4rem,3vw,2.4rem)}
.grid--2{grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr))}
.grid--3{grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr))}
.grid--aside{grid-template-columns:minmax(0,1.65fr) minmax(0,1fr);align-items:start}
.grid--aside figure img{max-width:330px}
@media (max-width:880px){.grid--aside{grid-template-columns:1fr}}

.entry{border-top:1px solid var(--rule);padding-top:1.35rem}
.band--dark .entry,.band--deep .entry{border-top-color:var(--rule-dark)}
.entry h3{margin-bottom:.4em}
.entry p{margin-bottom:0;color:var(--ink-soft);font-size:.985rem}
.band--dark .entry p,.band--deep .entry p{color:var(--on-dark-soft)}

.panel{
  background:#fff;border:1px solid var(--rule);border-radius:3px;
  padding:clamp(1.5rem,3vw,2.1rem);
}
.panel h3{margin-bottom:.5em}
.panel p:last-child{margin-bottom:0}

/* ---------- Statistics ------------------------------------------------ */

.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:1.6rem}
.stat{border-left:2px solid var(--jade);padding-left:1.1rem}
.stat__n{
  font-family:Newsreader,serif;font-size:var(--step-4);line-height:1;
  color:var(--limestone);font-variant-numeric:tabular-nums;display:block;
}
.stat__l{font-size:var(--step--1);color:var(--on-dark-soft);margin:.55rem 0 0;line-height:1.45}

/* ---------- Prose ----------------------------------------------------- */

.prose h2{margin-top:2.4em;font-size:var(--step-2)}
.prose h2:first-child{margin-top:0}
.prose h3{margin-top:1.9em}
.prose ul,.prose ol{padding-left:1.15rem;margin:0 0 1.3em}
.prose li{margin-bottom:.55em}
.prose blockquote{
  margin:1.9em 0;padding:.2rem 0 .2rem 1.35rem;border-left:2px solid var(--jade);
  font-family:Newsreader,serif;font-size:var(--step-1);line-height:1.55;color:var(--ink);
}
.prose blockquote p{max-width:56ch}
.prose blockquote cite{
  display:block;font-family:"IBM Plex Sans",sans-serif;font-size:var(--step--1);
  font-style:normal;color:var(--ink-faint);margin-top:.7rem;
}

.callout{
  background:var(--limestone-2);border-left:2px solid var(--sand);
  padding:1.3rem 1.5rem;margin:2em 0;border-radius:0 3px 3px 0;
}
.callout p:last-child{margin-bottom:0}
.callout h3{font-size:var(--step-0);font-family:"IBM Plex Sans",sans-serif;font-weight:600;margin-bottom:.5em}

/* Primary source block: the citation spine that answer engines can follow. */
.sources{border-top:1px solid var(--rule);margin-top:var(--sp-s);padding-top:1.3rem}
.sources h2{font-size:var(--step-0);font-family:"IBM Plex Sans",sans-serif;font-weight:600;margin-bottom:.7em}
.sources ol{list-style:decimal;padding-left:1.2rem;margin:0}
.sources li{font-size:.9rem;color:var(--ink-soft);margin-bottom:.5em}

/* ---------- Table of contents ---------------------------------------- */

.toc{border:1px solid var(--rule);border-radius:3px;padding:1.2rem 1.4rem;margin:0 0 2.4rem;background:#fff}
.toc h2{font-size:.86rem;font-family:"IBM Plex Sans",sans-serif;font-weight:600;
  letter-spacing:.02em;margin:0 0 .7em;color:var(--ink-faint)}
.toc ol{margin:0;padding-left:1.1rem}
.toc li{font-size:.94rem;margin-bottom:.35em}

/* ---------- Article / news lists -------------------------------------- */

.postlist{display:grid;gap:0;list-style:none;margin:0;padding:0}
.postlist li{max-width:none;border-top:1px solid var(--rule);padding:1.9rem 0}
.postlist li:last-child{border-bottom:1px solid var(--rule)}
.postlist h2,.postlist h3{font-size:var(--step-2);margin-bottom:.35em}
.postlist a{text-decoration:none}
.postlist a:hover{text-decoration:underline;text-decoration-color:var(--jade)}
.postlist p{color:var(--ink-soft);margin-bottom:.7rem}
.tagline{font-size:.82rem;color:var(--jade);font-weight:600;letter-spacing:.04em;margin:0 0 .55rem}

.breadcrumb{font-size:.86rem;color:var(--ink-faint);margin:0 0 1.4rem;max-width:none}
.breadcrumb a{text-decoration:none}
.breadcrumb a:hover{text-decoration:underline}
.band--dark .breadcrumb,.band--deep .breadcrumb{color:var(--on-dark-soft)}

/* ---------- FAQ ------------------------------------------------------- */

.faq{border-top:1px solid var(--rule)}
.band--dark .faq,.band--deep .faq{border-top-color:var(--rule-dark)}
.faq details{border-bottom:1px solid var(--rule);padding:0}
.band--dark .faq details,.band--deep .faq details{border-bottom-color:var(--rule-dark)}
.faq summary{
  cursor:pointer;list-style:none;padding:1.25rem 2.4rem 1.25rem 0;position:relative;
  font-family:Newsreader,serif;font-size:var(--step-1);line-height:1.35;
}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{
  content:"";position:absolute;right:.35rem;top:1.75rem;width:11px;height:11px;
  border-right:1.5px solid var(--jade);border-bottom:1.5px solid var(--jade);
  transform:rotate(45deg);transition:transform .2s ease;
}
.faq details[open] summary::after{transform:rotate(-135deg);top:1.95rem}
.faq details > div{padding:0 0 1.4rem}
.faq details p:last-child{margin-bottom:0}
@media (prefers-reduced-motion:reduce){.faq summary::after{transition:none}}

/* ---------- Partner marks (text set, no borrowed logos) --------------- */

.marks{display:flex;flex-wrap:wrap;gap:.6rem 0;list-style:none;margin:0;padding:0}
.marks li{
  max-width:none;font-size:.9rem;color:var(--on-dark-soft);
  padding:.35rem 1.1rem;border-right:1px solid var(--rule-dark);
}
.marks li:last-child{border-right:0}
.marks li:first-child{padding-left:0}

/* ---------- Contact form --------------------------------------------- */

.form{display:grid;gap:1.1rem;max-width:36rem}
.field{display:grid;gap:.4rem}
.field label{font-size:.9rem;font-weight:500}
.field input,.field textarea{
  font:inherit;font-size:.98rem;padding:.75rem .9rem;border:1px solid var(--rule);
  border-radius:2px;background:#fff;color:var(--ink);width:100%;
}
.field textarea{min-height:9rem;resize:vertical}
.field input:focus,.field textarea:focus{border-color:var(--jade);outline:none;box-shadow:0 0 0 3px rgba(47,107,95,.16)}

/* ---------- Footer ---------------------------------------------------- */

.footer{background:var(--indigo-900);color:var(--on-dark-soft);padding:var(--sp-m) 0 2.6rem}
.footer h2{font-size:.86rem;font-family:"IBM Plex Sans",sans-serif;font-weight:600;
  letter-spacing:.04em;color:var(--sand);margin:0 0 1rem}
.footer__grid{display:grid;grid-template-columns:1.5fr 1fr 1fr 1.2fr;gap:2.4rem}
.footer ul{list-style:none;margin:0;padding:0}
.footer li{margin-bottom:.55rem;font-size:.94rem;max-width:none}
.footer a{text-decoration:none;color:var(--on-dark-soft)}
.footer a:hover{color:var(--limestone);text-decoration:underline;text-decoration-color:var(--jade-300)}
.footer__bio{font-size:.94rem;line-height:1.66;max-width:38ch}
.footer__base{
  margin-top:var(--sp-s);padding-top:1.5rem;border-top:1px solid var(--rule-dark);
  display:flex;flex-wrap:wrap;gap:.8rem 1.6rem;justify-content:space-between;
  font-size:.85rem;
}
.footer__base p{margin:0;max-width:none}
@media (max-width:820px){.footer__grid{grid-template-columns:1fr 1fr;gap:2rem}}
@media (max-width:520px){.footer__grid{grid-template-columns:1fr}}

/* ---------- Utility --------------------------------------------------- */

.stack-s > * + *{margin-top:1.1rem}
.mt-m{margin-top:var(--sp-s)}
.visually-hidden{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0 0 0 0);white-space:nowrap;border:0;
}

/* One orchestrated entrance on the hero only. */
@media (prefers-reduced-motion:no-preference){
  .hero h1,.hero__lede,.hero .cta-row,.hero__figure,.hero__rule{
    opacity:0;transform:translateY(14px);
    animation:rise .72s cubic-bezier(.22,.68,.36,1) forwards;
  }
  .hero__rule{animation-delay:.05s}
  .hero h1{animation-delay:.12s}
  .hero__lede{animation-delay:.22s}
  .hero .cta-row{animation-delay:.32s}
  .hero__figure{animation-delay:.18s}
}
@keyframes rise{to{opacity:1;transform:none}}

@media print{
  .masthead,.footer,.cta-row{display:none}
  body{background:#fff;color:#000}
}
