/* phukettechguy — shared stylesheet for the root landing page and /for/<slug> pages.
   Editorial, warm, plain-spoken. Single-column hero, proof below the fold. */

:root {
  color-scheme: light;
  --paper:#F6F2EA; --paper-2:#EFE9DD; --panel:#FBF9F4;
  --ink:#1E1B16; --ink-2:#5B554B; --ink-3:#8A8378;
  --rule:#DDD5C6; --rule-strong:#C9BFAC;
  --accent:#1E6B5C; --accent-ink:#F6F2EA; --accent-soft:#DDEBE4; --accent-hover:#17564A;
  }
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper:#16171A; --paper-2:#1E2024; --panel:#1B1D21;
  --ink:#EDE8DF; --ink-2:#B3ACA0; --ink-3:#7E7870;
  --rule:#2B2E34; --rule-strong:#3D4149;
  --accent:#5FB89F; --accent-ink:#12201B; --accent-soft:#1F332D; --accent-hover:#7ACBB4;
  }

* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }
body {
  margin:0; background:var(--paper); color:var(--ink);
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size:16.5px; line-height:1.6; -webkit-font-smoothing:antialiased;
}
.wrap { max-width:1040px; margin-inline:auto; padding-inline:24px; }

h1,h2,h3 {
  font-family:Newsreader, ui-serif, Georgia, serif; font-weight:500;
  letter-spacing:-.012em; line-height:1.12; text-wrap:balance; margin:0;
  font-variation-settings:"opsz" 48;
}
h1 { font-size:clamp(34px,5.2vw,56px); }
h2 { font-size:clamp(26px,3.4vw,34px); }
h3 { font-size:21px; font-variation-settings:"opsz" 24; }
em { font-style:italic; }
h1 em, h2 em { color:var(--accent); font-weight:400; }
p { margin:0; }
a { color:var(--accent); text-underline-offset:3px; }
a:hover { color:var(--accent-hover); }
:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
strong { font-weight:600; color:var(--ink); }
.mono { font-family:"JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace; }

.kicker {
  font-family:Newsreader, Georgia, serif; font-style:italic; font-size:19px;
  color:var(--ink-3); margin:0 0 10px;
}
.lede { font-size:19px; color:var(--ink-2); max-width:56ch; }
.lede strong { font-weight:500; }

/* masthead */
.mast { border-bottom:1px solid var(--rule); }
.mast-in { display:flex; align-items:center; justify-content:space-between; gap:20px; padding-block:18px; }
.wordmark { font-family:Newsreader, Georgia, serif; font-weight:500; font-size:22px; color:var(--ink); text-decoration:none; letter-spacing:-.015em; }
.wordmark:hover { color:var(--ink); }
.nav { display:flex; gap:22px; font-size:14.5px; }
.nav a { color:var(--ink-2); text-decoration:none; }
.nav a:hover { color:var(--ink); }

/* theme toggle */
.mast-end { display:flex; align-items:center; gap:18px; }
#theme-toggle {
  appearance:none; background:transparent; border:1px solid var(--rule); border-radius:999px;
  width:34px; height:34px; display:grid; place-items:center; cursor:pointer; color:var(--ink-2);
  padding:0; line-height:0;
}
#theme-toggle:hover { color:var(--ink); border-color:var(--rule-strong); background:var(--paper-2); }
#theme-toggle svg { width:16px; height:16px; display:block; }
#theme-toggle .moon { display:none; }
:root[data-theme="dark"] #theme-toggle .sun { display:none; }
:root[data-theme="dark"] #theme-toggle .moon { display:block; }

/* circular reveal: the new theme wipes over the old one, no cross-fade */
::view-transition-old(root),
::view-transition-new(root) { animation:none; mix-blend-mode:normal; }
::view-transition-old(root) { z-index:1; }
::view-transition-new(root) { z-index:2; }
/* the tide field repaints per frame; hold it still during the wipe */
.theme-switching .tide-band pre { visibility:hidden; }

/* sections */
section { padding-block:64px; border-top:1px solid var(--rule); }
.section-head { margin-bottom:28px; }
.section-head p { margin-top:12px; color:var(--ink-2); max-width:58ch; }

/* hero */
.hero { padding-block:64px 56px; border-top:none; }
.hero h1 { max-width:19ch; }
.hero h1 br { display:none; }
@media (min-width:600px) { .hero h1 { max-width:none; text-wrap:initial; } .hero h1 br { display:inline; } }
.hero .lede { margin-top:22px; }
.cta-row { display:flex; flex-wrap:wrap; gap:10px; margin-top:30px; }
.btn {
  font-family:Inter, system-ui, sans-serif; font-weight:500; font-size:15px;
  text-decoration:none; padding:12px 20px; border-radius:6px;
  border:1px solid transparent; display:inline-block;
}
.btn-primary { background:var(--accent); color:var(--accent-ink); }
.btn-primary:hover { background:var(--accent-hover); color:var(--accent-ink); }
.btn-secondary { border-color:var(--rule-strong); color:var(--ink); }
.btn-secondary:hover { color:var(--ink); background:var(--paper-2); }


/* live log in the case section */
.log-panel { margin-top:28px; background:var(--panel); border:1px solid var(--rule); border-radius:8px; padding:16px 18px 12px; }
.log-head { display:flex; justify-content:space-between; gap:12px; font-size:12.5px; color:var(--ink-3); margin-bottom:8px; }
.log { font-family:"JetBrains Mono",ui-monospace,Menlo,monospace; font-size:12.5px; line-height:1.75; color:var(--ink-2); height:132px; overflow:hidden; }
.log div { display:grid; grid-template-columns:48px 1fr; gap:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.log .t { color:var(--ink-3); }
.log .ok { color:var(--accent); }

/* flows on the system rows */
pre.flow { margin:10px 0 0; font-family:"JetBrains Mono",ui-monospace,Menlo,monospace; font-size:12.5px; line-height:1.5; color:var(--ink-3); white-space:pre; overflow-x:auto; }
pre.flow b { color:var(--ink); font-weight:500; }
pre.flow em { color:var(--accent); font-style:normal; }

/* tide band */
.tide-band { position:relative; background:var(--accent-soft); border-top:1px solid var(--rule); overflow:hidden; height:150px; }
.tide-band pre { position:absolute; left:50%; transform:translateX(-50%); bottom:2px; margin:0; font-family:"JetBrains Mono",ui-monospace,Menlo,monospace; font-size:13px; line-height:1.25; letter-spacing:.2em; color:var(--accent); opacity:.7; white-space:pre; }
.tide-band span { position:absolute; left:24px; top:14px; font-size:12px; color:var(--accent); background:var(--paper); padding:3px 8px; border-radius:4px; }
.contact { padding-top:64px; }

/* case */
.case { display:grid; gap:28px; }
.case > div { min-width:0; }
.case p + p { margin-top:14px; }
.case .body { color:var(--ink-2); max-width:58ch; }
.case .second { margin-top:20px; padding-top:16px; border-top:1px solid var(--rule); }
.stats { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-top:26px; }
.stat { border-top:2px solid var(--ink); padding-top:10px; }
.stat .num { font-family:Newsreader, Georgia, serif; font-weight:500; font-size:30px; line-height:1; display:block; }
.stat .lbl { display:block; margin-top:6px; font-size:13.5px; color:var(--ink-2); }

/* offerings list */
.offer-list { border-top:1px solid var(--rule); }
.offer-item { display:grid; gap:6px 32px; padding:22px 0; border-bottom:1px solid var(--rule); }
.offer-item h3 { font-size:20px; }
.offer-item p { color:var(--ink-2); max-width:60ch; }
.offer-item .for { font-size:13.5px; color:var(--ink-3); }

.aside { margin-top:22px; color:var(--ink-2); font-size:15.5px; }

/* steps (a real sequence) */
.steps { display:grid; gap:0; counter-reset:step; }
.step { display:grid; grid-template-columns:40px 1fr; gap:16px; padding:22px 0; border-top:1px solid var(--rule); }
.step:last-child { border-bottom:1px solid var(--rule); }
.step::before { counter-increment:step; content:counter(step); font-family:Newsreader, Georgia, serif; font-size:26px; line-height:1; color:var(--accent); padding-top:2px; }
.step h3 { font-size:20px; }
.step p { color:var(--ink-2); margin-top:6px; max-width:58ch; }
.step .price { color:var(--ink); font-weight:500; }

/* observations (prospect pages) */
.obs-list { border-top:1px solid var(--rule); }
.obs { padding:18px 0 18px 26px; border-bottom:1px solid var(--rule); position:relative; color:var(--ink-2); max-width:62ch; }
.obs::before { content:""; position:absolute; left:0; top:29px; width:12px; height:2px; background:var(--accent); }

/* pitches (prospect pages) */
.pitches { display:grid; gap:18px; }
.pitch { border-top:2px solid var(--ink); padding-top:14px; }
.pitch h3 { font-size:19px; }
.pitch p { color:var(--ink-2); margin-top:8px; }

/* about */
.about { display:grid; gap:24px; }
.about p { color:var(--ink-2); max-width:58ch; }
.about p + p { margin-top:12px; }

/* contact */
.contact { padding-bottom:80px; }
.channels { display:grid; gap:10px; margin-top:28px; }
.chan { display:flex; justify-content:space-between; align-items:baseline; gap:16px; padding:16px 18px; border:1px solid var(--rule); border-radius:8px; text-decoration:none; color:var(--ink); background:var(--panel); }
.chan:hover { border-color:var(--rule-strong); color:var(--ink); background:var(--paper-2); }
.chan .k { font-size:13.5px; color:var(--ink-3); }
.chan .v { font-weight:500; font-size:15.5px; }

footer { border-top:1px solid var(--rule); padding-block:24px 40px; }
.foot-in { display:flex; flex-wrap:wrap; gap:8px 24px; justify-content:space-between; font-size:13.5px; color:var(--ink-3); }
.foot-in a { color:var(--ink-3); }

/* research placeholder */
.warn { background:#FFF3CD; color:#5C4300; border:1px solid #E8CF7A; padding:10px 14px; border-radius:6px; font-size:14px; margin-bottom:18px; }

@media (min-width:760px) {
  .case { grid-template-columns:1fr 1fr; gap:48px; }
  .offer-item { grid-template-columns:1fr 2fr; }
  .offer-item h3 { grid-row:1; }
  .offer-item .for { grid-column:1; }
  .offer-item p { grid-column:2; grid-row:1; }
  .offer-item pre.flow { grid-column:2; grid-row:2; }
  .pitches { grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:28px; }
  .about { grid-template-columns:1fr 2fr; gap:48px; }
  .channels { grid-template-columns:repeat(2,1fr); }
  .chan { flex-direction:column; align-items:flex-start; gap:6px; }
}
@media (max-width:560px) {
  .nav { display:none; }
  .tide-band { height:110px; }
  .tide-band pre { font-size:9px; }
  .stats { grid-template-columns:1fr 1fr; }
}
