/* smallplanet.online — v4 "Windows XP-ish" theme
   The whole page is desktop chrome: light-blue desktop, XP-style glossy
   titlebars with real [– □ ✕] buttons (red close!), warm-gray window
   faces, menu-bar nav, taskbar footer. The DOS hero window is the one
   dark element left and pops harder for it.
   History: v1 evergreen (green vetoed) → v2 navy retro (too dark) → v4.
   No green, no teal anywhere — standing veto. */

:root {
  /* Classic Windows gray desktop (the #c0c0c0 family), not baby blue */
  --desk:      #cccccc;
  --desk-deep: #b9b9b9;

  --face:      #ece9d8;   /* XP window face / menu bar */
  --face-edge: #d6d2ba;
  --client:    #fdfdfb;   /* white client area inside windows */

  --xp-hi:     #6aa3ec;   /* titlebar gloss top */
  --xp:        #2a63c4;   /* titlebar mid */
  --xp-deep:   #17418f;   /* titlebar bottom + window borders */

  --red-x:     #d2452e;
  --red-x-hi:  #e8735f;

  --ink:       #1c2530;
  --ink-soft:  #45566a;
  --ink-faint: #6b7c8f;

  --amber:      #e8a33d;
  --amber-deep: #b97f1e;
  --amber-glow: #ffd9a0;

  --link-1999:    #0f3bce;
  --visited-1999: #6b30a5;
  --term-bg:      #10161d;
  --term-chrome:  #2a3644;

  --shadow-win: 3px 3px 0 rgba(23,65,143,.25);
  --shadow-pop: 5px 5px 0 rgba(23,65,143,.3);

  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Tahoma, Roboto, Arial, sans-serif;
  --mono:  ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;

  --measure: 66ch;
  --wide: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--desk), var(--desk-deep));
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--xp-deep); color: #fff; padding: .75rem 1.25rem;
  z-index: 100; border-radius: 0 0 6px 0;
}
.skip:focus { left: 0; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ================= window chrome primitives ================= */
.tbar {
  display: flex; align-items: center; gap: .6rem;
  padding: .42rem .6rem .42rem .9rem;
  background: linear-gradient(180deg, var(--xp-hi) 0%, var(--xp) 46%, var(--xp-deep) 100%);
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .02em;
  border-radius: 7px 7px 0 0;
  text-shadow: 0 1px 1px rgba(0,0,0,.35);
}
.tbar--mono { font-family: var(--mono); font-weight: 600; }
.tbar__title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wbtns { display: flex; gap: 3px; flex: none; cursor: default; user-select: none; }
.wbtns i {
  display: inline-flex; align-items: center; justify-content: center;
  width: 19px; height: 17px;
  font-style: normal; font-size: .68rem; line-height: 1;
  font-family: var(--mono);
  color: #fff;
  background: linear-gradient(180deg, #7fa8e0, #3a6cc0 60%, #2a58a4);
  border: 1px solid #1c4590;
  border-radius: 3px;
  text-shadow: none;
}
.wbtns i.x {
  background: linear-gradient(180deg, var(--red-x-hi), var(--red-x) 60%, #b23520);
  border-color: #92290f;
}

/* a generic window */
.win {
  background: var(--client);
  border: 2px solid var(--xp-deep);
  border-radius: 8px;
  box-shadow: var(--shadow-win);
  overflow: hidden;
}

/* ================= masthead: THE window ================= */
.masthead { padding: 1rem 1rem 0; }
.masthead__inner {
  max-width: var(--wide);
  margin: 0 auto;
  border: 2px solid var(--xp-deep);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  box-shadow: var(--shadow-win);
  display: block;
  padding: 0;
}
.brand {
  display: flex; align-items: center; gap: .6rem;
  color: #fff; text-decoration: none;
  flex: 1; min-width: 0;
}
.brand__mark { flex: none; width: 26px; height: 26px; }
.brand__name {
  font-family: var(--mono);
  font-size: 1.05rem;
  line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand__name b { font-weight: 600; color: var(--amber-glow); }
.brand__cursor {
  display: inline-block; width: .55em; height: 1em;
  background: var(--amber-glow); vertical-align: -0.15em; margin-left: .1em;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .brand__cursor { animation: none; } }
.brand__sub { display: none; }

/* nav = the menu bar */
.nav {
  background: var(--face);
  border-top: 1px solid #fff;
  border-bottom: 2px solid var(--face-edge);
  padding: .2rem .4rem;
}
.nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0;
}
.nav a {
  display: block;
  padding: .55rem .85rem;
  color: var(--ink);
  text-decoration: none;
  font-size: .95rem;
  border-radius: 4px;
  white-space: nowrap;
}
.nav a:hover { background: var(--xp); color: #fff; }
.nav a[aria-current="page"] {
  background: linear-gradient(180deg, var(--xp-hi), var(--xp));
  color: #fff;
  font-weight: 600;
}

/* ================= hero: light desktop, dark DOS window ============ */
.hero { padding: 0 1rem; }
.hero__inner {
  max-width: var(--wide); margin: 0 auto;
  background: var(--client);
  border: 2px solid var(--xp-deep);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  box-shadow: var(--shadow-win);
  padding: 2.75rem 2rem 3rem;
  display: grid; gap: 2.5rem;
  grid-template-columns: 1fr;
  align-items: center;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4.6vw, 2.7rem);
  line-height: 1.16;
  margin: 0 0 1rem;
  font-weight: 400;
  color: var(--xp-deep);
}
.hero h1 em { font-style: normal; color: var(--amber-deep); }
.hero p {
  font-size: 1.16rem;
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 0 1.6rem;
}
.hero__inner > * { min-width: 0; }
@media (min-width: 880px) {
  .hero__inner { grid-template-columns: 1.05fr .95fr; padding: 3rem 2.5rem 3.25rem; }
}

/* ================= the DOS window (unchanged soul) ================= */
.term {
  background: var(--term-bg);
  border-radius: 7px;
  box-shadow: var(--shadow-pop);
  border: 2px solid var(--xp-deep);
  overflow: hidden;
  font-family: var(--mono);
  font-size: .88rem;
  line-height: 1.7;
}
.term__bar {
  background: linear-gradient(180deg, var(--xp-hi) 0%, var(--xp) 46%, var(--xp-deep) 100%);
  padding: .4rem .7rem;
  display: flex; align-items: center; gap: .45rem;
  color: #fff; font-size: .78rem; font-weight: 700;
  text-shadow: 0 1px 1px rgba(0,0,0,.35);
}
.term__dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.35); }
.term__dot--a { background: var(--amber); }
.term__title { flex: 1; margin-left: .3rem; letter-spacing: .03em; }
.term__body { padding: 1rem 1.1rem 1.2rem; overflow-x: auto; }
.term__body pre { margin: 0; font-family: inherit; white-space: pre; }
.term .p   { color: var(--amber); }
.term .cmd { color: #f2f5f8; }
.term .out { color: #93a6b6; }
.term .ok  { color: var(--amber-glow); }
.term__cursor {
  display: inline-block; width: .58em; height: 1em;
  background: var(--amber); vertical-align: -0.12em;
  animation: blink 1.1s steps(1) infinite;
}

/* ================= buttons ================= */
.btn {
  display: inline-block;
  padding: .8rem 1.5rem;
  border-radius: 5px;
  font-weight: 600;
  font-size: 1.02rem;
  text-decoration: none;
  cursor: pointer;
}
.btn--primary {
  background: linear-gradient(180deg, var(--amber-glow), var(--amber) 55%, var(--amber-deep));
  color: #3a2a08;
  border: 1px solid var(--amber-deep);
  box-shadow: 2px 2px 0 rgba(23,65,143,.3);
  text-shadow: 0 1px 0 rgba(255,255,255,.4);
}
.btn--primary:hover { filter: brightness(1.06); color: #3a2a08; }
.btn--primary:active { box-shadow: 1px 1px 0 rgba(23,65,143,.3); transform: translate(1px,1px); }
.btn--ghost {
  border: 1px solid var(--xp-deep);
  color: var(--xp-deep);
  background: linear-gradient(180deg, #fff, #dde6f2);
  box-shadow: 2px 2px 0 rgba(23,65,143,.2);
}
.btn--ghost:hover { background: linear-gradient(180deg, #fff, #cddcf0); color: var(--xp-deep); }
.btn + .btn { margin-left: .6rem; }

/* ================= layout ================= */
.wrap { max-width: var(--wide); margin: 0 auto; padding: 3rem 1.25rem; }
.wrap--narrow { max-width: 760px; }
.prose { max-width: var(--measure); }
.prose p, .prose li { color: var(--ink-soft); }
.prose p { margin: 0 0 1.1rem; }
.prose strong { color: var(--ink); }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--xp-deep); font-weight: 400; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.5rem); line-height: 1.2; margin: 0 0 1rem; }
h2 { font-size: clamp(1.45rem, 3vw, 1.8rem); line-height: 1.25; margin: 2.4rem 0 1rem; }
h3 { font-size: 1.18rem; margin: 1.6rem 0 .55rem; color: var(--xp); }
.lede { font-size: 1.22rem; color: var(--ink-soft); max-width: 58ch; }

a { color: var(--xp); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.prose a, .quote a, .folio__item p a, .callout a, .lede a {
  color: var(--link-1999);
  text-decoration: underline;
}
.prose a:visited, .quote a:visited, .folio__item p a:visited,
.callout a:visited, .lede a:visited { color: var(--visited-1999); }
a:hover { color: var(--amber-deep); }

.section-head { display: flex; align-items: baseline; gap: 1rem; margin: 0 0 1.4rem; }
.section-head h2 { margin: 0; }
.section-head::after { content: ""; flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--xp-deep) 0 6px, transparent 6px 12px); opacity: .35; }

/* ================= cards = windows ================= */
.grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
  background: var(--client);
  border: 2px solid var(--xp-deep);
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow-win);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.card > :not(.card__meta) { margin-left: 1.5rem; margin-right: 1.5rem; }
.card > h3:first-child { margin-top: 1.4rem; }   /* windows without a titlebar */
.card h3 { margin: .35rem 1.5rem .45rem; color: var(--xp-deep); font-size: 1.28rem; }
.card p { color: var(--ink-soft); margin: 0 1.5rem 1rem; font-size: 1rem; }
.card__meta {
  /* the titlebar */
  display: flex; align-items: center; gap: .6rem;
  margin: 0 0 1rem;
  padding: .42rem .5rem .42rem .9rem;
  background: linear-gradient(180deg, var(--xp-hi) 0%, var(--xp) 46%, var(--xp-deep) 100%);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-shadow: 0 1px 1px rgba(0,0,0,.35);
  border-bottom: 1px solid var(--xp-deep);
}
.card__meta .tbar__title { text-transform: uppercase; }
.card__price {
  font-family: var(--serif);
  font-size: 2rem; color: var(--xp-deep);
  margin: .2rem 1.5rem;
}
.card__price small { font-size: 1rem; color: var(--ink-faint); font-family: var(--sans); }
.card__link { margin: auto 1.5rem 1.4rem; font-weight: 600; text-decoration: none; }
.card__link::after { content: " \2192"; }
a.card { text-decoration: none; color: inherit; }
a.card:hover {
  box-shadow: var(--shadow-pop);
  transform: translate(-2px, -2px);
  transition: transform .12s ease, box-shadow .12s ease;
}
.card--flag .card__meta {
  background: linear-gradient(180deg, var(--amber-glow), var(--amber) 55%, var(--amber-deep));
  color: #3a2a08;
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
}
.card--flag .card__meta .wbtns i { border-color: #8a5d12; background: linear-gradient(180deg, #f6c884, #d99b2e 60%, #b97f1e); }
.card--flag .card__meta .wbtns i.x { background: linear-gradient(180deg, var(--red-x-hi), var(--red-x) 60%, #b23520); border-color: #92290f; }

/* Specificity guard: .card p / .folio__item p would otherwise restyle the
   titlebar <p> — first it stole the color (v3/v4 unreadable-titlebar bug),
   then the margins (v4.4 titlebar-stops-short bug). Pin both here. */
.card p.card__meta { color: #fff; margin: 0 0 1rem; }
.card--flag p.card__meta { color: #3a2a08; margin: 0 0 1rem; }
.folio__item p.folio__year { color: #fff; margin: 0 0 1rem; }

/* ================= steps ================= */
.steps { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); counter-reset: step; }
.step {
  background: var(--client);
  border: 2px solid var(--xp-deep); border-radius: 8px;
  padding: 1.5rem; position: relative; counter-increment: step;
  box-shadow: var(--shadow-win);
}
.step::before {
  content: "C:\\" counter(step) ">";
  display: inline-block;
  padding: .3rem .6rem;
  background: var(--term-bg); color: var(--amber);
  font-family: var(--mono); font-size: .95rem;
  border-radius: 4px;
  margin-bottom: .85rem;
}
.step h3 { margin: 0 0 .4rem; }
.step p { margin: 0; color: var(--ink-soft); font-size: .98rem; }

/* ================= story = notepad window ================= */
.story { padding: 0 1.25rem; }
.story__inner {
  max-width: var(--wide); margin: 0 auto;
  background: var(--client);
  border: 2px solid var(--xp-deep);
  border-radius: 8px;
  box-shadow: var(--shadow-win);
  overflow: hidden;
  display: block;
}
.story__body {
  padding: 2rem 2rem 1.5rem;
  display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: center;
}
.story h2 { color: var(--xp-deep); margin: 0 0 1rem; }
.story p { color: var(--ink-soft); max-width: 62ch; margin: 0 0 1rem; }
.story strong { color: var(--amber-deep); font-weight: 600; }
/* the route, spoken in DOS: light text on terminal-dark, amber arrow */
.story__route {
  font-family: var(--mono); font-size: 1.02rem; font-weight: 600;
  color: #f2f5f8;
  letter-spacing: .04em;
  padding: .85rem 1.1rem;
  background: var(--term-bg);
  border: 2px solid var(--xp-deep);
  border-radius: 6px;
  white-space: nowrap;
}
.route__arrow { color: var(--amber); letter-spacing: 0; }
@media (max-width: 480px) {
  .story__route { font-size: .85rem; padding: .7rem .8rem; }
}
@media (min-width: 860px) { .story__body { grid-template-columns: 1fr auto; } }

/* ================= testimonials = guestbook.txt ================= */
.quotes { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.quote {
  background: var(--client);
  border: 2px solid var(--xp-deep); border-radius: 8px;
  padding: 0; box-shadow: var(--shadow-win);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.quote blockquote {
  margin: 1.1rem 1.5rem 1rem; font-family: var(--serif); font-size: 1.08rem;
  color: var(--ink); line-height: 1.55;
}
.quote blockquote::before { content: "\201C"; color: var(--amber-deep); font-size: 1.6rem; line-height: 0; margin-right: .1rem; }
.quote figcaption { margin: auto 1.5rem 1.3rem; color: var(--ink-faint); font-size: .95rem; }

/* ================= portfolio: stacked, story-first ================= */
.folio { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.folio__item {
  background: var(--client);
  border: 2px solid var(--xp-deep); border-radius: 8px;
  padding: 0; box-shadow: var(--shadow-win);
  display: flex; flex-direction: column; overflow: hidden;
}
.folio__year {
  display: flex; align-items: center; gap: .6rem;
  margin: 0 0 1rem;
  padding: .4rem .5rem .4rem .9rem;
  background: linear-gradient(180deg, var(--xp-hi) 0%, var(--xp) 46%, var(--xp-deep) 100%);
  color: #fff; font-size: .78rem; font-weight: 700;
  font-family: var(--mono); letter-spacing: .08em;
  text-shadow: 0 1px 1px rgba(0,0,0,.35);
}
.folio__item h3 { margin: .3rem 1.5rem .45rem; }
.folio__item p { color: var(--ink-soft); font-size: 1rem; margin: 0 1.5rem 1rem; }
.folio__item--wide { grid-column: 1 / -1; }
.folio__item--wide h3 { font-size: 1.5rem; }
.folio__links {
  margin: auto 1.5rem 1.4rem;
  display: flex; gap: 1.5rem; flex-wrap: wrap;
}
.folio__links .card__link { margin: 0; }

/* ---------- prose sheet: a white document window for long text ------- */
.sheet {
  background: var(--client);
  border: 2px solid var(--xp-deep);
  border-radius: 8px;
  box-shadow: var(--shadow-win);
  overflow: hidden;
}
.sheet__body { padding: 1.9rem 2rem 2.4rem; }
@media (max-width: 640px) { .sheet__body { padding: 1.4rem 1.25rem 1.8rem; } }

/* ---------- case study before/after ---------- */
.ba {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 1.5rem;
}
.shot {
  margin: 0;
  background: var(--client);
  border: 2px solid var(--xp-deep); border-radius: 8px;
  box-shadow: var(--shadow-win);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.shot img {
  display: block; width: 100%; height: auto;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: #fff;
}
.shot .card__meta { margin-bottom: 0; }
.shot figcaption {
  padding: .8rem 1.2rem 1rem;
  color: var(--ink-faint); font-size: .92rem;
}

/* ================= callout ================= */
.callout {
  background: var(--face);
  border: 1px solid var(--face-edge);
  border-left: 5px solid var(--amber);
  border-radius: 6px;
  padding: 1.3rem 1.6rem;
  margin: 2rem 0;
}
.callout p { margin: 0; color: var(--ink); }
.callout p + p { margin-top: .7rem; }

/* ================= contact = compose window ================= */
.contact-strip { padding: 0 1.25rem 3rem; }
.contact-strip__inner {
  max-width: 720px; margin: 0 auto; text-align: center;
  background: var(--client);
  border: 2px solid var(--xp-deep); border-radius: 8px;
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}
.contact-strip__body { padding: 1.8rem 1.8rem 2.2rem; }
.contact-strip h2 { color: var(--xp-deep); margin: 0 0 .6rem; }
.contact-strip p { color: var(--ink-soft); margin: 0 0 1.4rem; }
.contact-strip a.btn--primary {
  font-size: 1rem; font-family: var(--mono);
  max-width: 100%; overflow-wrap: anywhere;
}

/* ================= footer = taskbar ================= */
.foot {
  background: linear-gradient(180deg, #3672d4 0%, var(--xp) 8%, var(--xp-deep) 100%);
  color: #cfe0f4;
  padding: 1.6rem 1.25rem 2rem;
  font-size: .95rem;
  border-top: 2px solid #0f3372;
  margin-top: 1rem;
}
.foot__inner {
  max-width: var(--wide); margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between;
}
.foot a { color: #e6f0fc; }
.foot a:hover { color: #fff; }
.foot ul { list-style: none; margin: .5rem 0 0; padding: 0; }
.foot li a { display: inline-block; padding: .4rem 0; }
.foot strong { text-shadow: 0 1px 1px rgba(0,0,0,.3); }
.foot__legal {
  width: 100%; border-top: 1px solid rgba(255,255,255,.2);
  padding-top: 1.2rem; color: #a9c3e4; font-size: .87rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
}
.badge88 { flex: none; image-rendering: pixelated; }

img { max-width: 100%; height: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
