/* FtryTech site. Tokens come from ftryos/brand/README.md (the Ftry palette and Inter). */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/assets/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/assets/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("/assets/inter-latin-700-normal.woff2") format("woff2"); }

:root {
  --petronas: #00d2be;
  --amg: #003540;
  --teal: #00877b;
  --teal-ink: #006b62;
  --ink: #020617;
  --muted: #475569;
  --line: #e2e8f0;
  --wash: #f1f8f7;
  --surface: #ffffff;
  --gradient: linear-gradient(135deg, var(--petronas), var(--amg));

  /* type scale, ratio 1.25 from 17px */
  --step-0: 1.0625rem;
  --step-1: 1.33rem;
  --step-2: clamp(1.4rem, 1.1rem + 1vw, 1.66rem);
  --step-3: clamp(1.75rem, 1.2rem + 1.8vw, 2.6rem);
  --step-4: clamp(2.4rem, 1.4rem + 3.6vw, 4.4rem);

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 76rem;
  --section: clamp(4rem, 9vw, 8rem);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
@media (min-width: 110rem) { html { font-size: 118.75%; } }
body {
  margin: 0;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface);
  font-feature-settings: "cv11", "ss01";
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.025em; text-wrap: balance; margin: 0; }
p, li, dd { text-wrap: pretty; }
p { margin: 0; }
a { color: var(--teal-ink); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--ink); color: #fff; padding: 0.6rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.04em; min-height: 44px; }
.brand svg { width: 2rem; height: 2rem; flex: none; }
.brand b { color: var(--teal); font-weight: 700; }
.site-nav ul { display: flex; gap: clamp(0.25rem, 2vw, 1.5rem); list-style: none; margin: 0; padding: 0; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 0.5rem; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--teal-ink); text-decoration: underline; text-decoration-thickness: 2px; }
@media (max-width: 30rem) { .site-nav .optional { display: none; } }

/* buttons */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 0.7rem 1.35rem; border-radius: 10px; font-weight: 600; text-decoration: none;
  border: 1px solid var(--teal); transition: background-color 160ms ease-out, color 160ms ease-out;
}
.button.primary { background: var(--teal); color: #fff; }
.button.primary:hover { background: var(--teal-ink); }
.button.quiet { background: transparent; color: var(--teal-ink); }
.button.quiet:hover { background: var(--wash); }

/* hero: the F monogram on its own 64-unit construction grid */
.hero { padding-block: clamp(3rem, 8vw, 7rem) var(--section); overflow: clip; }
.hero .wrap { display: grid; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.hero h1 { font-size: var(--step-4); font-weight: 700; letter-spacing: -0.045em; max-width: 14ch; }
.hero .lede { margin-top: 1.5rem; font-size: var(--step-1); color: var(--muted); max-width: 36ch; line-height: 1.45; }
.hero .actions { margin-top: 2.25rem; }
.construction { width: 100%; max-width: 30rem; justify-self: end; }
.construction .grid line { stroke: var(--line); stroke-width: 1; }
.construction .grid line.major { stroke: #cbd5e1; }
.construction .dims text { font: 600 9px Inter, sans-serif; fill: var(--muted); letter-spacing: 0.02em; }
.construction .dims line { stroke: var(--muted); stroke-width: 0.75; }
@media (max-width: 52rem) {
  .hero .wrap { grid-template-columns: 1fr; }
  .construction { max-width: 9rem; justify-self: start; order: -1; }
  .construction .dims { display: none; }
}
@media (max-height: 30rem) and (orientation: landscape) {
  .construction { display: none; }
  .hero .wrap { grid-template-columns: 1fr; }
}

/* sections */
section { scroll-margin-top: 4.5rem; }
.section { padding-block: var(--section); border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 1rem; max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { font-size: var(--step-3); }
.section-head p { color: var(--muted); font-size: var(--step-1); line-height: 1.45; }

/* products */
.product { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: center; }
.product + .product { margin-top: clamp(4rem, 9vw, 7rem); }
.product h3 { font-size: var(--step-3); letter-spacing: -0.04em; }
.product h3 b { color: var(--teal); }
.product .kind { color: var(--muted); font-weight: 600; margin-top: 0.4rem; }
.product .what { margin-top: 1.25rem; font-size: var(--step-1); line-height: 1.45; max-width: 32ch; }
.product ul { margin: 1.5rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.75rem; max-width: 40ch; }
.product li { padding-left: 1.4rem; position: relative; }
.product li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 0.55rem; height: 0.55rem; background: var(--teal); }
.status { display: inline-block; margin-top: 1.5rem; padding: 0.3rem 0.7rem; border-radius: 999px; background: var(--wash); color: var(--teal-ink); font-weight: 600; font-size: 0.9rem; }
.product .actions { margin-top: 1.5rem; }
.product figure { margin: 0; }
.product figcaption { margin-top: 0.75rem; color: var(--muted); font-size: 0.9rem; }
@media (max-width: 52rem) { .product { grid-template-columns: 1fr; } }

/* FtryHQ's project page, drawn as its layout: Ask on top, tasks left, chat right */
.layout-drawing {
  aspect-ratio: 16 / 10; border: 1px solid var(--line); border-radius: 16px; padding: clamp(0.8rem, 2vw, 1.25rem);
  display: grid; gap: clamp(0.6rem, 1.5vw, 1rem); grid-template: auto 1fr / 1fr 1fr; background: #fbfdfd;
}
.layout-drawing > div { border-radius: 10px; padding: clamp(0.7rem, 1.6vw, 1rem); font-size: 0.9rem; }
.layout-drawing .ask { grid-column: 1 / -1; background: #fff; border: 1.5px solid var(--teal); color: var(--muted); display: flex; align-items: center; gap: 0.6rem; }
.layout-drawing .ask strong { color: var(--ink); }
.layout-drawing .tasks, .layout-drawing .chat { background: #fff; border: 1px solid var(--line); display: grid; align-content: start; gap: 0.5rem; }
.layout-drawing h4 { margin: 0 0 0.25rem; font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.layout-drawing .row { border-radius: 6px; background: var(--wash); padding: 0.4rem 0.6rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.layout-drawing .row.done { color: var(--muted); text-decoration: line-through; }
.layout-drawing .msg { border-radius: 8px; background: #f1f5f9; padding: 0.4rem 0.6rem; width: fit-content; max-width: 95%; }
.layout-drawing .msg.me { background: var(--teal); color: #fff; justify-self: end; }
@media (max-width: 26rem) { .layout-drawing { aspect-ratio: auto; } .layout-drawing .optional { display: none; } }

/* how we work */
.principles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); counter-reset: p; }
.principles li { border-top: 2px solid var(--ink); padding-top: 1.25rem; counter-increment: p; }
.principles li::before { content: "0" counter(p); display: block; font-weight: 700; color: var(--teal); font-variant-numeric: tabular-nums; margin-bottom: 0.75rem; }
.principles h3 { font-size: var(--step-2); }
.principles p { margin-top: 0.75rem; color: var(--muted); }
@media (max-width: 52rem) { .principles { grid-template-columns: 1fr; } }

/* contact */
.contact { background: var(--amg); color: #e6f7f5; border-top: 0; }
.contact .section-head h2 { color: #fff; }
.contact .section-head p { color: #b9dcd8; }
.contact a { color: #fff; }
.addresses { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0; margin: 0; border-top: 1px solid rgb(255 255 255 / 0.18); }
.addresses div { padding: 1.25rem 1.25rem 1.25rem 0; border-bottom: 1px solid rgb(255 255 255 / 0.18); }
.addresses dt { font-weight: 600; color: #fff; }
.addresses dd { margin: 0.25rem 0 0; color: #b9dcd8; }
.addresses dd a { font-weight: 600; overflow-wrap: anywhere; }
.contact .where { margin-top: 2.5rem; color: #b9dcd8; }

/* footer */
.site-footer { padding-block: 2.5rem calc(2.5rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: baseline; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: var(--muted); display: inline-block; padding-block: 0.6rem; }
.site-footer .note { flex-basis: 100%; }

/* text pages: legal and contact */
.doc { padding-block: clamp(3rem, 7vw, 5.5rem) var(--section); }
.doc .wrap { max-width: 46rem; }
.doc h1 { font-size: var(--step-3); }
.doc .updated { margin-top: 0.75rem; color: var(--muted); }
.doc h2 { font-size: var(--step-2); margin-top: 2.75rem; }
.doc p, .doc ul, .doc dl { margin-top: 1rem; }
.doc li + li { margin-top: 0.4rem; }
.doc dt { font-weight: 600; margin-top: 1rem; }
.doc dd { margin: 0.2rem 0 0; color: var(--muted); }
.doc .summary { margin-top: 1.75rem; padding: 1.25rem 1.4rem; background: var(--wash); border-radius: 12px; }

.notfound { min-height: 60svh; display: grid; align-content: center; }
.notfound p { margin-top: 1rem; color: var(--muted); font-size: var(--step-1); }
.notfound .actions { margin-top: 2rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
