/* ==========================================================================
   Andreas Doukas — EM & thermal simulation consulting
   ========================================================================== */

:root {
  /* Ink & paper */
  --ink:      #0b1430;
  --ink-2:    #3a4462;
  --muted:    #6b7591;
  --line:     #e3e7ef;
  --paper:    #ffffff;
  --paper-2:  #f4f6fa;

  /* Brand blues (from the AD monogram) */
  --blue:     #2f5cb4;
  --blue-2:   #5a80c8;
  --blue-3:   #a9c0ea;

  /* Night sections */
  --hero-bg:  #080e1e;   /* keep in sync with BG in js/field.js */
  --night:    #0b1328;
  --night-2:  #111b36;
  --night-line: rgba(169, 192, 234, 0.14);
  --on-night: #e8eefb;
  --on-night-2: #9eabc9;

  /* Type */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --brand: "Montserrat", var(--sans);

  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --nav-h: 72px;
  --radius: 10px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--blue-3); color: var(--ink); }
:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Brand lockup ---------- */
.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--ink); }
.brand .mono { width: 40px; height: auto; flex: none; }
.wordmark {
  display: flex; flex-direction: column; gap: 3px;
  padding-left: 14px; border-left: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 25%, transparent);
}
.wm-name {
  font-family: var(--brand); font-weight: 400; font-size: 15px;
  letter-spacing: 0.24em; text-transform: uppercase; line-height: 1;
}
.wm-tag {
  font-family: var(--brand); font-weight: 500; font-size: 7.5px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--blue-2); line-height: 1;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 15px/1 var(--sans); letter-spacing: 0.01em;
  padding: 15px 24px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #244c9c; }
.btn-ghost { color: var(--on-night); border-color: rgba(232, 238, 251, 0.28); }
.btn-ghost:hover { border-color: var(--on-night); }
.btn-ghost span { transition: transform .2s var(--ease); }
.btn-ghost:hover span { transform: translateX(3px); }
.btn-sm { padding: 10px 18px; font-size: 14px; }

/* ---------- Eyebrows & headings ---------- */
.eyebrow {
  font: 500 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 22px; display: flex; align-items: center; gap: 12px;
}
.eyebrow .num { color: var(--muted); }
.eyebrow .num::after { content: ""; display: inline-block; width: 28px; height: 1px; background: currentColor; margin-left: 12px; vertical-align: middle; opacity: .6; }
.eyebrow.on-dark { color: var(--blue-3); }
.eyebrow.on-dark .num { color: var(--on-night-2); }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.1; }
h3 { font-size: 23px; line-height: 1.25; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  transition: background .3s var(--ease), box-shadow .3s var(--ease), color .3s var(--ease);
}
.nav-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); height: 100%;
  display: flex; align-items: center; gap: 40px;
}
.nav nav { margin-left: auto; }
.nav-links { display: flex; gap: 34px; }
.nav-links a {
  font-size: 14.5px; font-weight: 500; color: var(--ink-2); position: relative; padding: 6px 0;
  transition: color .2s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }

.nav.on-dark .brand { color: var(--on-night); }
.nav.on-dark .nav-links a { color: var(--on-night-2); }
.nav.on-dark .nav-links a:hover, .nav.on-dark .nav-links a.active { color: #fff; }
.nav.scrolled {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--hero-bg); color: var(--on-night);
  min-height: max(720px, 100svh);
  display: flex; flex-direction: column; justify-content: flex-end;
}
#field, #field-marks { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -3; }
#field-marks { z-index: -2; }
.hero-scrim {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8,14,30,.94) 0%, rgba(8,14,30,.78) 34%, rgba(8,14,30,.15) 66%, rgba(8,14,30,0) 100%),
    linear-gradient(0deg, rgba(8,14,30,.95) 0%, rgba(8,14,30,0) 32%);
}
.hero-grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(169,192,234,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(169,192,234,.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
}
.hero-inner { width: 100%; padding-top: calc(var(--nav-h) + 56px); padding-bottom: 56px; }
.hero h1 {
  font-size: clamp(42px, 5.6vw, 78px); line-height: 1.02; letter-spacing: -0.02em;
  max-width: 15ch; margin-bottom: 26px;
}
.hero h1 em { font-style: italic; color: var(--blue-3); }
.hero-sub { font-size: clamp(17px, 1.5vw, 19px); color: var(--on-night-2); max-width: 34em; margin-bottom: 38px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-note { font: 400 12.5px/1.4 var(--mono); color: var(--on-night-2); display: flex; align-items: center; gap: 10px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #5fd3a0; box-shadow: 0 0 0 4px rgba(95,211,160,.15); }

.fig-note {
  position: absolute; right: var(--gutter); top: calc(var(--nav-h) + 28px);
  font: 400 11px/1.6 var(--mono); color: rgba(158,171,201,.7); text-align: right; letter-spacing: 0.02em;
}
.fig-note span { color: rgba(158,171,201,.5); }

.creds {
  width: 100%; display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--night-line);
}
.cred { padding: 26px 24px 30px 0; display: flex; flex-direction: column; gap: 6px; }
.cred + .cred { padding-left: 24px; border-left: 1px solid var(--night-line); }
.cred-k { font-family: var(--serif); font-size: 26px; line-height: 1.1; color: #fff; }
.cred-v { font-size: 13.5px; color: var(--on-night-2); line-height: 1.45; }

/* ---------- Sections ---------- */
.section { padding: clamp(88px, 11vw, 140px) 0; }
.section-tint { background: var(--paper-2); }
.section-dark { background: var(--night); color: var(--on-night); }
.section-head {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: end;
  margin-bottom: clamp(48px, 6vw, 72px);
}
.section-head h2 { max-width: 16ch; }
.section-lede { color: var(--ink-2); font-size: 17.5px; max-width: 30em; }
.section-dark .section-lede { color: var(--on-night-2); }

/* ---------- Plot styling (shared SVG illustrations) ---------- */
.plot { width: 100%; height: auto; display: block; overflow: visible; }
.plot .grid  { stroke: var(--p-grid); stroke-width: .8; fill: none; }
.plot .ax    { stroke: var(--p-ax); stroke-width: 1.1; fill: none; }
.plot .c1    { stroke: var(--p-c1); stroke-width: 1.8; fill: none; stroke-linejoin: round; }
.plot .c1.thin { stroke-width: 1; opacity: .6; }
.plot .c2    { stroke: var(--p-c2); stroke-width: 1.4; fill: none; stroke-linejoin: round; }
.plot .fill1 { fill: var(--p-c1); opacity: .12; stroke: none; }
.plot .lim   { stroke: var(--p-lim); stroke-width: 1.2; stroke-dasharray: 5 4; fill: none; }
.plot .band  { fill: var(--p-c1); opacity: .09; }
.plot .mark  { fill: none; stroke: var(--p-lim); stroke-width: 1.4; }
.plot .pt    { fill: var(--p-c1); opacity: .8; }
.plot .pt2   { fill: var(--p-lim); }
.plot .bar   { fill: var(--p-c1); opacity: .75; }
.plot .bar2  { fill: var(--p-lim); opacity: .8; }
.plot .slot  { stroke: var(--p-ax); stroke-width: 3.2; }
.plot .mag1  { fill: var(--p-c1); opacity: .85; }
.plot .mag2  { fill: var(--p-c2); opacity: .7; }
.plot .iso   { fill: none; stroke: rgba(255,255,255,.35); stroke-width: .8; stroke-dasharray: 2 3; }
.plot .comp  { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 1; }
.plot .lbl   { font: 400 9.5px var(--mono); fill: var(--p-lbl); letter-spacing: .02em; }

.svc-fig, .case-fig {
  --p-grid: #e3e8f2; --p-ax: #9aa6c0; --p-c1: var(--blue); --p-c2: #b4bfd6;
  --p-lim: #d9603b; --p-lbl: #7a85a1;
}
.case-fig {
  --p-grid: rgba(169,192,234,.1); --p-ax: rgba(169,192,234,.45); --p-c1: #7fa2e6;
  --p-c2: rgba(169,192,234,.35); --p-lim: #f08a5d; --p-lbl: rgba(169,192,234,.6);
}

/* ---------- Services ---------- */
.svc-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.svc {
  padding: 32px 32px 38px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--paper); transition: background .25s var(--ease);
}
.svc:hover { background: #fafbfd; }
.svc-fig {
  margin: -8px -8px 26px; padding: 14px 10px; border-radius: 8px;
  background:
    linear-gradient(var(--paper-2), var(--paper-2)) padding-box;
  transition: transform .4s var(--ease);
}
.svc:hover .svc-fig { transform: translateY(-3px); }
.tool { font: 500 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin-bottom: 12px; }
.svc h3 { margin-bottom: 10px; }
.svc p:last-child { color: var(--ink-2); font-size: 15.5px; }

/* ---------- Approach ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: s; }
.step { padding: 34px 28px 8px 0; border-top: 1px solid var(--night-line); position: relative; }
.step + .step { padding-left: 28px; }
.step::before {
  content: ""; position: absolute; top: -1px; left: 0; width: 48px; height: 1px; background: var(--blue-2);
}
.step + .step::before { left: 28px; }
.step-n { font: 500 12px/1 var(--mono); color: var(--blue-3); letter-spacing: .1em; display: block; margin-bottom: 22px; }
.step h3 { color: #fff; margin-bottom: 12px; }
.step p { color: var(--on-night-2); font-size: 15.5px; }

/* ---------- Case studies ---------- */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.case {
  display: flex; flex-direction: column; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.case:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(11,20,48,.25); border-color: #d3d9e6; }
.case-fig {
  background: var(--night);
  background-image:
    radial-gradient(120% 90% at 80% 0%, rgba(90,128,200,.18), transparent 60%);
  padding: 22px 20px 18px; aspect-ratio: 16 / 10; display: flex; align-items: center;
}
.case > .case-body { padding: 26px 26px 24px; display: flex; flex-direction: column; flex: 1; }
.case h3 { font-size: 21px; margin-bottom: 12px; }
.case > .case-body > p:not(.tool) { color: var(--ink-2); font-size: 15px; margin-bottom: 24px; }
.case-foot {
  margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 12px;
}
.metric { font-family: var(--serif); font-size: 30px; line-height: 1; color: var(--blue); }
.metric-l { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.arrow { color: var(--blue); transition: transform .25s var(--ease); }
.case:hover .arrow { transform: translateX(4px); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 7vw, 96px); align-items: center; }
.about-photo { position: relative; }
.about-photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%;
  border-radius: var(--radius); filter: saturate(.92);
}
.about-photo::before {
  content: ""; position: absolute; inset: 18px -18px -18px 18px; z-index: -1;
  border: 1px solid var(--line); border-radius: var(--radius);
  background-image: radial-gradient(var(--blue-3) 1px, transparent 1px); background-size: 14px 14px;
  opacity: .7;
}
.about-photo figcaption { font: 400 11.5px var(--mono); color: var(--muted); margin-top: 42px; letter-spacing: .04em; }
.about-text h2 { margin-bottom: 28px; }
.about-text > p:not(.eyebrow) { color: var(--ink-2); margin-bottom: 18px; max-width: 36em; }

/* ---------- Contact ---------- */
.contact { position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 80% at 100% 0%, rgba(90,128,200,.16), transparent 70%);
}
.contact-inner { position: relative; display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 7vw, 96px); align-items: start; }
.contact-text h2 { margin-bottom: 22px; }
.contact-text > p:not(.eyebrow) { color: var(--on-night-2); max-width: 28em; margin-bottom: 32px; }
.contact-points li {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-top: 1px solid var(--night-line); color: var(--on-night); font-size: 15.5px;
}
.contact-points li:last-child { border-bottom: 1px solid var(--night-line); }
.contact-points li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue-2); flex: none; }

.contact-form {
  display: flex; flex-direction: column; gap: 18px;
  background: var(--night-2); border: 1px solid var(--night-line); border-radius: 14px;
  padding: clamp(24px, 3vw, 36px);
}
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form label { display: flex; flex-direction: column; gap: 8px; }
.contact-form label > span { font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--on-night-2); }
.contact-form input, .contact-form select, .contact-form textarea {
  font: 400 16px/1.4 var(--sans); color: var(--on-night);
  background: rgba(8, 14, 30, 0.6); border: 1px solid rgba(169,192,234,.2); border-radius: 8px;
  padding: 13px 14px; width: 100%; outline: none; resize: vertical;
  transition: border-color .2s, box-shadow .2s;
}
.contact-form select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239eabc9' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.contact-form select:invalid { color: rgba(158,171,201,.6); }
.contact-form option { color: var(--ink); background: #fff; }
.contact-form ::placeholder { color: rgba(158,171,201,.5); }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  border-color: var(--blue-2); box-shadow: 0 0 0 3px rgba(90,128,200,.2);
}
.form-foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 4px; }
.form-note { font-size: 12.5px; color: var(--on-night-2); }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status:empty { display: none; }
.form-status { font-size: 14px; color: var(--on-night-2); }
.form-status.error { color: #f0a0a0; }
.form-done { display: flex; flex-direction: column; justify-content: center; gap: 10px; min-height: 100%; }
.form-done h3 { color: var(--on-night); font-weight: 500; }
.form-done p { color: var(--on-night-2); }

/* ---------- Footer ---------- */
.footer { background: var(--hero-bg); color: var(--on-night-2); border-top: 1px solid var(--night-line); }
.footer-inner { display: flex; align-items: center; gap: 32px; padding-top: 36px; padding-bottom: 36px; flex-wrap: wrap; }
.footer .brand { color: var(--on-night); margin-right: auto; }
.footer .brand .mono { width: 32px; }
.footer p { font-size: 13px; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .svc-grid, .case-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .step:nth-child(3) { padding-left: 0; }
  .step:nth-child(3)::before { left: 0; }
  .creds { grid-template-columns: repeat(2, 1fr); }
  .cred:nth-child(3) { padding-left: 0; border-left: 0; }
  .cred:nth-child(n+3) { border-top: 1px solid var(--night-line); }
  .nav-cta { display: none; }
}

@media (max-width: 860px) {
  .section-head, .about, .contact-inner { grid-template-columns: 1fr; }
  .section-head { gap: 20px; }
  .about-photo { max-width: 420px; }
  .fig-note { display: none; }

  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    margin-left: auto; width: 40px; height: 40px; background: none; border: 0; cursor: pointer; color: inherit;
  }
  .nav-toggle span { display: block; height: 1.5px; width: 22px; background: currentColor; margin: 0 auto; transition: transform .25s var(--ease); }
  .nav.on-dark .nav-toggle { color: var(--on-night); }
  .nav nav {
    position: fixed; inset: var(--nav-h) 0 auto 0; margin: 0;
    background: rgba(255,255,255,.97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
  }
  .nav.open nav { opacity: 1; transform: none; pointer-events: auto; }
  .nav.open { background: rgba(255,255,255,.97); color: var(--ink); }
  .nav.open .brand { color: var(--ink); }
  .nav.open .nav-toggle { color: var(--ink); }
  .nav.open .nav-toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav.open .nav-toggle span:last-child  { transform: translateY(-3.75px) rotate(-45deg); }
  .nav-links { flex-direction: column; gap: 0; }
  .nav-links a, .nav.on-dark .nav-links a { display: block; padding: 14px 0; font-size: 17px; color: var(--ink); border-bottom: 1px solid var(--line); }
  .nav-links a::after { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wm-tag { display: none; }
  .wm-name { font-size: 13px; }
  .brand .mono { width: 34px; }
  .svc-grid, .case-grid, .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding-left: 0; }
  .step::before, .step + .step::before { left: 0; }
  .creds { grid-template-columns: 1fr 1fr; }
  .cred { padding: 18px 12px 20px 0; }
  .cred + .cred { padding-left: 12px; }
  .cred:nth-child(3) { padding-left: 0; }
  .cred-k { font-size: 21px; }
  .svc { padding: 26px 22px 30px; }
  .contact-form .row { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* Featured case: full-width, figure beside text */
.case-feature { grid-column: 1 / -1; flex-direction: row; }
.case-feature .case-fig { flex: 0 0 52%; aspect-ratio: auto; padding: 32px 36px 26px; }
.case-feature .case-body { padding: 36px 40px 32px; justify-content: center; }
.case-feature h3 { font-size: clamp(24px, 2.4vw, 30px); }
.case-feature .case-body > p:not(.tool) { margin-bottom: 28px; }
.case-feature .metric { font-size: 38px; }
@media (max-width: 860px) {
  .case-feature { flex-direction: column; }
  .case-feature .case-fig { flex: none; aspect-ratio: 16 / 10; padding: 22px 20px 18px; }
  .case-feature .case-body { padding: 26px 26px 24px; }
}

/* Toolchain choice under services */
.toolchains { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; }
.tc { padding: 30px 32px 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-2); }
.tc h3 { margin-bottom: 10px; }
.tc p:last-child { color: var(--ink-2); font-size: 15.5px; }
@media (max-width: 640px) { .toolchains { grid-template-columns: 1fr; } .tc { padding: 24px 22px; } }

/* Live demo button in the nav */
.nav-demo { margin-left: -24px; }
.nav.scrolled .nav-demo { color: var(--ink); border-color: #cfd6e4; }
.nav.scrolled .nav-demo:hover { border-color: var(--ink); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #5fd3a0; box-shadow: 0 0 0 3px rgba(95,211,160,.18); }
.only-mobile { display: none; }
@media (max-width: 1040px) { .nav-demo { margin-left: 0; } }
@media (max-width: 860px) { .nav-demo { display: none; } .only-mobile { display: block; } }
.btn-ghost { background: transparent; }

/* Just-for-fun case card */
.case-fun {
  margin-top: 24px; display: flex; align-items: center; gap: 32px; padding: 26px 36px;
  border-radius: var(--radius); background: var(--night); color: var(--on-night);
  background-image: radial-gradient(80% 140% at 0% 50%, rgba(90,128,200,.22), transparent 60%);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.case-fun:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -18px rgba(11,20,48,.45); }
.fun-glass { width: 92px; flex: none; }
.case-fun .tool { color: var(--blue-3); }
.case-fun h3 { color: #fff; font-size: 24px; margin-bottom: 6px; }
.case-fun .fun-body p:last-child { color: var(--on-night-2); font-size: 15px; }
.case-fun .arrow { margin-left: auto; color: var(--blue-3); font-size: 20px; }
.case-fun:hover .arrow { transform: translateX(4px); }
@media (max-width: 640px) { .case-fun { flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px; } .case-fun .arrow { display: none; } }
