/* PT Coba Dulu Siapa Tahu: corporate site. Brand Identity v1.1.
   Sage and Spark are fills only, never text. One Spark per page (it lives in the logo mark).

   Layout system (one grid for every block):
   - Container: content max 1072px, side padding 20px (<760) and 32px (>=760).
   - 12 columns, 24px gutter. From 960px three-up blocks span 4 columns each and
     two-column blocks split 7 + 5; below 960px every block stacks on the full width.
     Running text is capped at 7 columns (and 40em) so line length stays readable.
   - Vertical scale: 4 8 12 16 24 32 48 64 96 (--s1 to --s9). */

@font-face { font-family: "Plus Jakarta Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/plus-jakarta-sans-400.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/plus-jakarta-sans-500.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/plus-jakarta-sans-700.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/plus-jakarta-sans-800.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/jetbrains-mono-400.woff2") format("woff2"); }

:root {
  /* Brand Identity v1.1 */
  --sapphire: #1A3668;
  --midnight: #0B2046;
  --sage: #8BAE9E;
  --spark: #F2994A;
  --canvas: #F9F8F6;
  --deep-sage: #4F7566;
  --body: #4A5568;
  --line: #E2E0DA;
  --card: #FFFFFF;

  /* Tints derived from the palette */
  --sage-wash: #EEF3F0;            /* Sage over Canvas, soft band */
  --sage-line: #D3DFD9;            /* hairlines on the sage band */
  --paper: #F3F1EC;                /* deeper Canvas, footer */
  --grid-ink: rgba(26, 54, 104, 0.06); /* Sapphire, faint grid */
  --shadow: 0 1px 0 rgba(11, 32, 70, 0.03), 0 10px 28px -18px rgba(11, 32, 70, 0.22);
  --grain: url("../grain.svg");

  --sans: "Plus Jakarta Sans", Arial, sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;

  /* Grid */
  --max: 1072px;
  --side: 20px;
  --gap: 24px;

  /* Vertical spacing scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --section: var(--s8);
  --head-gap: var(--s6);

  /* Type scale */
  --t-xs: 0.75rem;     /* 12px mono labels */
  --t-sm: 0.875rem;    /* 14px meta, footer */
  --t-md: 1rem;        /* 16px small body */
  --t-base: 1.0625rem; /* 17px body */
  --t-lg: 1.25rem;     /* 20px lead, h3 */
  --t-xl: 1.625rem;    /* 26px product name, footer title */

  color-scheme: light;
}
@media (min-width: 760px) { :root { --side: 32px; } }
@media (min-width: 960px) { :root { --section: var(--s9); --head-gap: var(--s7); } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--grain), var(--canvas);
  color: var(--body);
  font-family: var(--sans);
  font-size: var(--t-base);
  line-height: 1.65;
  font-weight: 400;
}

img, svg { max-width: 100%; height: auto; }
a { color: var(--sapphire); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--midnight); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--sapphire); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: var(--side); top: -60px; background: var(--midnight); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }

/* The one container and the 12-column grid */
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--side)); margin: 0 auto; padding: 0 var(--side); }
.g12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.g12 > * { grid-column: 1 / -1; min-width: 0; }
@media (min-width: 960px) {
  .g12 > .span-4 { grid-column: span 4; }
  .g12 > .span-7 { grid-column: 1 / span 7; }
  .g12 > .span-5 { grid-column: 8 / span 5; }
  .g12 > .text { grid-column: 1 / span 7; }
}
.text { max-width: 40em; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; padding-top: var(--s3); padding-bottom: var(--s3); }
.logo { display: inline-block; line-height: 0; }
.logo img { height: 52px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: var(--s1) 22px; flex-wrap: wrap; font-weight: 500; font-size: 0.9375rem; }
.nav a { color: var(--midnight); text-decoration: none; padding: 6px 2px; }
.nav a:hover { text-decoration: underline; }
.nav .lang { font-family: var(--mono); font-size: var(--t-xs); letter-spacing: 0.06em; border: 1px solid var(--sapphire); border-radius: 999px; padding: 4px 12px; color: var(--sapphire); }
.nav .lang:hover { background: var(--sapphire); color: #fff; text-decoration: none; }

/* Typography */
.eyebrow { font-family: var(--mono); font-size: var(--t-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--deep-sage); margin: 0 0 var(--s4); display: flex; align-items: center; gap: var(--s3); }
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--sage); flex: none; }
h1, h2, h3 { color: var(--midnight); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.375rem); text-wrap: balance; }
h3 { font-size: var(--t-lg); letter-spacing: -0.01em; line-height: 1.3; margin-bottom: var(--s2); }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.125rem, 2vw, var(--t-lg)); line-height: 1.6; color: var(--body); margin: var(--s4) 0 0; }

/* Sections */
section { padding: var(--section) 0; }
.section-head { margin-bottom: var(--head-gap); }
.section-head > :last-child { margin-bottom: 0; }
@media (min-width: 960px) { .g12 > .section-head { grid-column: 1 / span 8; } }

/* Soft tinted band: sage wash, paper grain, hairlines */
.band { background: var(--grain), var(--sage-wash); border-top: 1px solid var(--sage-line); border-bottom: 1px solid var(--sage-line); }
.band p { color: #3B4656; }
/* Hairline between two Canvas sections, drawn inside the container */
.ruled { padding-top: 0; }
.ruled > .wrap::before { content: ""; display: block; grid-column: 1 / -1; height: 1px; background: var(--line); margin-bottom: var(--section); }

/* Hero: a faint drafting grid behind the opening statement */
.hero { position: relative; padding: var(--s8) 0 var(--section); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(to right, var(--grid-ink) 1px, transparent 1px), linear-gradient(to bottom, var(--grid-ink) 1px, transparent 1px);
  background-size: 32px 32px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 35%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 70% 35%, #000 10%, transparent 75%);
}
.hero .wrap { position: relative; row-gap: var(--s7); align-items: center; }
.hero h1 { font-size: clamp(2.375rem, 5.6vw, 3.75rem); text-wrap: balance; }
.hero h1 .quiet { display: block; font-weight: 500; color: var(--sapphire); font-size: 0.66em; letter-spacing: -0.01em; margin-top: var(--s2); text-wrap: balance; }
.hero .lead { margin-top: var(--s5); }
.hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); margin: var(--s6) 0 0; }
.text-link { font-weight: 500; }

/* Example test record: a lab-notebook page */
.record { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: var(--s5); box-shadow: var(--shadow); }
.record-tag { font-family: var(--mono); font-size: var(--t-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--deep-sage); margin: 0 0 var(--s4); padding-bottom: var(--s3); border-bottom: 1px dashed var(--line); display: flex; align-items: center; gap: var(--s2); }
.record-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sage); flex: none; }
.record dl { margin: 0; }
.record .row { display: grid; grid-template-columns: 84px 1fr; gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--line); }
.record .row:first-child { border-top: 0; padding-top: 0; }
.record dt { font-family: var(--mono); font-size: var(--t-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--midnight); padding-top: 4px; }
.record dd { margin: 0; color: var(--midnight); }
.record-note { font-size: var(--t-sm); color: var(--body); margin: var(--s4) 0 0; padding-top: var(--s3); border-top: 1px dashed var(--line); }

/* Cards */
.cards { row-gap: var(--s4); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: var(--s5); box-shadow: var(--shadow); }
@media (min-width: 960px) { .card { padding: var(--s6); } }
.card p:last-child { margin-bottom: 0; }
.num { font-family: var(--mono); font-size: var(--t-xs); color: var(--deep-sage); letter-spacing: 0.1em; margin-bottom: var(--s4); display: flex; align-items: center; gap: var(--s2); line-height: 1; }
.num::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--sage); background: var(--card); flex: none; }

/* How we work: one process line runs through Test, Measure, Repeat */
.process { position: relative; }
.process::before { content: ""; position: absolute; left: calc(var(--s5) + 5px); top: 0; bottom: 0; border-left: 1px dashed var(--sage); }
.process .num::before { background: var(--sage); }
@media (min-width: 960px) {
  .process::before { left: 0; right: 0; bottom: auto; top: calc(var(--s6) + 7px); border-left: 0; border-top: 1px dashed var(--sage); }
}
.process .card { position: relative; }

/* Products */
.product { row-gap: var(--s5); align-items: start; }
.product-card h3 { font-size: var(--t-xl); }
.chip { display: inline-block; background: var(--sage); color: var(--midnight); font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.02em; padding: 4px 12px; border-radius: 999px; margin-bottom: var(--s4); }
.button { display: inline-block; background: var(--midnight); color: #fff; text-decoration: none; font-weight: 700; padding: 12px 22px; border-radius: 10px; }
.button:hover { background: var(--sapphire); color: #fff; }
.product-card .button { margin-top: var(--s2); }
.product-aside { padding-top: var(--s2); }
.products-more { margin-top: var(--s3, 24px); }
.note { font-size: var(--t-md); color: var(--body); border-left: 2px solid var(--sage); padding-left: var(--s4); margin: var(--s5) 0 0; }

/* About: facts as a ledger */
.about { row-gap: var(--s6); align-items: start; }
.about .text > :last-child { margin-bottom: 0; }
.facts { margin: 0; border-top: 1px solid var(--sage-line); }
.facts .row { display: grid; grid-template-columns: 1fr; gap: var(--s1); padding: var(--s3) 0; border-bottom: 1px solid var(--sage-line); }
.facts dt { font-family: var(--mono); font-size: var(--t-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--deep-sage); }
.facts dd { margin: 0; color: var(--midnight); }
@media (min-width: 560px) and (max-width: 959px) { .facts .row { grid-template-columns: 150px 1fr; gap: var(--s4); } .facts dt { padding-top: 4px; } }

/* Team */
.founder h3 { margin-bottom: var(--s3); }

/* Footer: Contact first (three items on the card columns), then the company line */
.site-footer { background: var(--grain), var(--paper); border-top: 1px solid var(--line); padding: var(--s8) 0 var(--s7); font-size: var(--t-sm); line-height: 1.6; }
.footer-title { font-size: var(--t-xl); letter-spacing: -0.015em; margin-bottom: var(--s5); }
.footer-grid { row-gap: var(--s5); }
.contact-item { border-top: 1px solid var(--line); padding-top: var(--s4); }
.contact-item p { margin: 0; }
.contact-label { color: var(--body); font-size: var(--t-sm); font-weight: 500; margin-bottom: var(--s1) !important; }
.contact-value { font-size: var(--t-base); color: var(--body); }
.contact-value a { font-weight: 700; font-size: 1.125rem; letter-spacing: -0.005em; word-break: break-word; }
.contact-value a[type] { font-weight: 700; font-size: var(--t-base); }
.contact-meta { color: var(--body); font-size: var(--t-sm); }
.nowrap { white-space: nowrap; }
.footer-base { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--line); row-gap: var(--s3); color: var(--body); }
.footer-base p { margin: 0; }
.legal-name { font-family: var(--mono); font-size: var(--t-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--midnight); margin-bottom: var(--s1) !important; }

/* Open projects page: two compact cards inside the normal container */
.projects-page { padding: var(--s7) 0 var(--s8); }
.projects-page .section-head { margin-bottom: var(--s5); }
.projects-page h1 { font-size: clamp(1.75rem, 3.6vw, 2.375rem); text-wrap: balance; }
.project-list { row-gap: var(--s4); align-items: stretch; }
.project { display: flex; flex-direction: column; align-items: flex-start; }
.project h3 { font-size: var(--t-xl); }
.project p { margin-bottom: var(--s3); }
.project .chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s4); }
.project .chip { margin-bottom: 0; }
.project .button { margin-top: auto; }
@media (min-width: 960px) { .project-list > .project { grid-column: span 6; } }
.licence-note { font-size: var(--t-sm); margin: var(--s5) 0 0; }
.footer-base-first { margin-top: 0; padding-top: 0; border-top: 0; }
.legal-page { padding: var(--s6, 48px) 0; }
.legal-page .wrap { max-width: 760px; }
.legal-page p { margin: 0 0 var(--s2, 16px); }
.legal-table { width: 100%; border-collapse: collapse; margin: 0 0 var(--s3, 24px); font-size: 0.95rem; }
.legal-table th, .legal-table td { border: 1px solid #c9d1e0; padding: 8px 10px; text-align: left; vertical-align: top; }
.legal-table th { background: #eef1f7; }
