/* Tugak.Supply — blueprint style */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-semibold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0F2E6E;      /* Ink/Page */
  --card: #1C47A6;     /* Blueprint/Card */
  --grid: #2A57B8;     /* Grid */
  --line: #5E7FC9;     /* Line/Outline */
  --muted: #A9BCE6;    /* Muted */
  --paper: #F4F7FF;    /* Paper */

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: 16px;
  --pad: 32px;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: -0.035em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--paper); color: var(--card);
  padding: 10px 16px; border-radius: 999px;
  font-weight: 600; font-size: 15px; letter-spacing: -0.03em;
}
.skip-link:focus { top: 16px; }

/* ---------- Type styles (from the design file) ---------- */
.t-hero    { font-size: clamp(64px, 13.334vw, 160px); line-height: .95; letter-spacing: -0.07em; font-weight: 500; }
.t-section { font-size: clamp(52px, 8vw, 96px);        line-height: 1;   letter-spacing: -0.068em; font-weight: 500; }
.t-heading { font-size: clamp(38px, 5.334vw, 64px);    line-height: 1;   letter-spacing: -0.07em; font-weight: 500; }
.t-lead    { font-size: clamp(26px, 3.334vw, 40px);    line-height: 1.15; letter-spacing: -0.055em; font-weight: 500; }
.t-row     { font-size: clamp(22px, 2.667vw, 32px);    line-height: 1.1; letter-spacing: -0.05em; font-weight: 500; }
.t-sub     { font-size: clamp(20px, 2.334vw, 28px);    line-height: 1.2; letter-spacing: -0.05em; font-weight: 500; }
.t-body    { font-size: 18px; line-height: 1.4; letter-spacing: -0.035em; font-weight: 500; }
.t-mono    { font-family: var(--mono); font-weight: 400; font-size: 12px; line-height: 1.2; letter-spacing: -0.04em; }
.muted { color: var(--muted); }

/* ---------- Page frame ---------- */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter) var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.main { display: flex; flex-direction: column; gap: 16px; }
.inline-link { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
.inline-link:hover { text-decoration-color: var(--muted); }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.nav-pill {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 42px;
  padding: 6px 24px 6px 20px;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.nav-logo { font-size: 14px; line-height: 1; letter-spacing: -0.03em; white-space: nowrap; }
.nav-divider { width: 1px; height: 20px; background: var(--line); flex: none; }
.nav-links { display: flex; align-items: center; gap: 0; }
.nav-links li + li { margin-left: 4px; }
.nav-links li:first-child { margin-right: 6px; }
.nav-link {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.nav-link:hover { border-color: var(--line); }
.nav-link--outlined, .nav-link--outlined:hover { border-color: var(--paper); }
.nav-link[aria-current="page"] { background: var(--paper); border-color: var(--paper); color: var(--card); }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  margin-right: -14px;
  border: 1px solid var(--paper);
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  letter-spacing: -0.03em;
}
.menu-toggle-icon { position: relative; width: 12px; height: 8px; }
.menu-toggle-icon::before, .menu-toggle-icon::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
  transition: transform .2s ease, top .2s ease;
}
.menu-toggle-icon::before { top: 0; }
.menu-toggle-icon::after { top: 6.5px; }
.menu-toggle[aria-expanded="true"] { background: var(--paper); color: var(--card); }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon::before { top: 3.25px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon::after { top: 3.25px; transform: rotate(-45deg); }

.menu-panel {
  display: none;
  width: 100%;
  margin-top: 8px;
  padding: 8px 20px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.menu-panel a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.05em;
}
.menu-panel a[aria-current="page"]::after { content: "●"; font-size: 10px; align-self: center; }
.menu-panel .menu-foot { display: flex; gap: 16px; padding-top: 16px; }
.menu-panel .menu-foot a { font-family: var(--mono); font-size: 12px; letter-spacing: -0.04em; border: 0; padding: 0; color: var(--muted); }

/* ---------- Cards / panels ---------- */
.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--pad);
  overflow: hidden;
}
.card--blue { background: var(--card); }
.card--paper { background: var(--paper); border-color: var(--paper); color: var(--card); }
.grid-bg {
  background-color: var(--card);
  background-image:
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px),
    linear-gradient(to right, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
}
.card > * { position: relative; }

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: -0.04em;
  white-space: nowrap;
  width: max-content;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--paper); flex: none; }

/* Tags */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: -0.04em;
  color: var(--muted);
  white-space: nowrap;
}
.tag--soon { border: 1px dashed var(--paper); color: var(--paper); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 15px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--solid { background: var(--paper); color: var(--card); }
.btn--solid:hover { background: #fff; }
.btn--blue { background: var(--card); color: var(--paper); }
.btn--blue:hover { background: var(--ink); }
.btn--outline-blue { border-color: var(--card); color: var(--card); }
.btn--outline-blue:hover { background: var(--card); color: var(--paper); }

/* ---------- Home hero ---------- */
.home-hero {
  height: 640px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  container-type: inline-size;
}
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.home-hero .bottom { display: flex; flex-direction: column; gap: 4px; }
.home-hero .title {
  font-size: 18.3cqi;
  line-height: 1;
  letter-spacing: -0.075em;
  margin-left: -0.02em;
  white-space: nowrap;
}

/* ---------- Two column intro (Hello, What, Who, Past work) ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 640px;
  gap: 32px;
}
.split .labels { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.split .body { display: flex; flex-direction: column; gap: 20px; }
.letter p + p { margin-top: 0.6em; }

/* ---------- Home index ---------- */
.index-title { display: flex; justify-content: space-between; align-items: flex-end; padding: 40px 0 28px; }
.index-list { border-bottom: 1px solid var(--line); }
.index-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  transition: padding .2s ease;
}
.index-row .open { color: var(--paper); transition: transform .2s ease; }
.index-row:hover { padding-left: 8px; padding-right: 8px; }
.index-row:hover .tag { border-color: var(--paper); color: var(--paper); }

/* ---------- Email signup ---------- */
.signup { display: flex; align-items: flex-end; gap: 32px; }
.signup .copy { flex: 1 1 610px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; min-width: 0; }
.signup .copy p { max-width: 610px; }
.signup .form { flex: 0 1 460px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
/* TALLY FORM EMBED goes in .tally-slot (see index.html) */
.tally-slot {
  min-height: 170px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tally-slot iframe { width: 100%; border: 0; }
.tally-slot:has(iframe) { border: 0; display: block; }

/* ---------- Inner page hero ---------- */
.page-hero {
  padding: 96px var(--pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}
.page-hero .t-sub { max-width: 600px; }

/* ---------- Free Stuff: goods ---------- */
.goods { display: flex; flex-direction: column; gap: 44px; }
.goods-head { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.category { display: flex; flex-direction: column; gap: 6px; scroll-margin-top: 80px; }
.category-head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: end;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.category-head .t-mono { padding-bottom: 6px; }

.product-row {
  display: grid;
  grid-template-columns: 56px 64px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 24px 16px;
  border-radius: 10px;
  transition: background-color .15s ease;
}
.product-row:hover { background: var(--row-hover, var(--card)); }
.thumb {
  width: 64px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background-color: rgba(94, 127, 201, .25);
  background-image: repeating-linear-gradient(-45deg, rgba(94, 127, 201, .6) 0 1px, transparent 1px 11.31px);
}
.product-row .action { color: var(--paper); }

/* Donate + next cards */
.donate { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.donate .stack { display: flex; flex-direction: column; gap: 24px; }
.donate .label { color: var(--card); }
.donate h2 { color: var(--ink); }

.next-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: background-color .15s ease;
}
.next-card:hover { background: #fff; }
.next-card .arrow { display: inline-block; transition: transform .2s ease; }
.next-card:hover .arrow { transform: translateX(6px); }

/* ---------- Techbeast ---------- */
.skins-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 24px; }
.skins-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.skin {
  aspect-ratio: 267 / 300;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ---------- About facts ---------- */
.facts .fact {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.facts .fact:first-of-type { border-top: 0; padding-top: 32px; }

/* ---------- Archive ---------- */
.work { --row-hover: var(--grid); display: flex; flex-direction: column; gap: 16px; }
.work-head { padding-bottom: 24px; }
.work-rows { border-top: 1px solid var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.contact { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.contact .copy { display: flex; flex-direction: column; gap: 14px; }
.contact .label { color: var(--card); }
.contact h2 { color: var(--ink); }

/* ---------- License ---------- */
.license { display: flex; flex-direction: column; gap: 24px; }
.check-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.check-list li:last-child { border-bottom: 1px solid var(--line); }
.check-list .t-mono { padding-top: 4px; }

/* ---------- 404 ---------- */
.lost-hero {
  min-height: 795px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  container-type: inline-size;
}
.lost-hero .top { padding-bottom: 24px; }
.lost-hero .bottom { display: flex; flex-direction: column; gap: 8px; }
.lost-hero .title { font-size: 56.6cqi; line-height: 1; letter-spacing: -0.075em; margin-left: -0.04em; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--paper);
  color: var(--card);
  border-radius: var(--radius);
  padding: 32px 32px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
  container-type: inline-size;
}
.footer-info { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.footer-info .socials { display: flex; gap: 16px; }
.footer-info a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-rule { height: 1px; background: var(--card); }
.footer-mark { position: relative; height: 40.7cqi; }
.footer-mark .word {
  font-size: 36.3cqi;
  line-height: 1.12;
  letter-spacing: -0.06em;
  margin-left: -0.05em;
  white-space: nowrap;
}
.footer-mark .reg { position: absolute; right: 0; top: 0.9cqi; font-size: 8cqi; line-height: 1; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ================= Tablet (≤ 960) ================= */
@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; gap: 24px; }
  .home-hero { height: auto; min-height: 520px; }
  .signup { flex-direction: column; align-items: stretch; }
  .signup .copy, .signup .form { flex: none; }
  .skins-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .index-row { grid-template-columns: 64px minmax(0, 1fr) auto auto; }
  .contact { flex-direction: column; align-items: flex-start; }
}

/* ================= Phone (≤ 640) ================= */
@media (max-width: 640px) {
  :root { --pad: 20px; --gutter: 12px; }
  .page { gap: 12px; }

  .nav-pill { width: 100%; justify-content: space-between; padding: 6px 20px; }
  .nav-pill .nav-links, .nav-pill .nav-divider { display: none; }
  .menu-toggle { display: inline-flex; }
  .menu-panel.is-open { display: block; }

  .home-hero { min-height: 460px; }
  .home-hero .row-between { flex-direction: column; align-items: flex-start; }
  .home-hero .sub-row { gap: 16px; margin-bottom: 8px; }
  .home-hero .top .note { display: none; }

  .index-title { padding: 28px 0 20px; }
  .index-row { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; padding: 18px 0; }
  .index-row .tag { display: none; }
  .index-row:hover { padding-left: 0; padding-right: 0; }

  .page-hero { padding: 64px var(--pad); gap: 16px; }

  .category-head { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; }
  .product-row {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    grid-template-areas: "thumb name name" "thumb meta action";
    column-gap: 14px;
    row-gap: 6px;
    padding: 16px 8px;
  }
  .product-row .num { display: none; }
  .product-row .thumb { grid-area: thumb; width: 48px; height: 40px; }
  .product-row .name { grid-area: name; }
  .product-row .meta { grid-area: meta; }
  .product-row .action { grid-area: action; justify-self: end; }

  .skins-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .skin { padding: 12px; }

  .facts .fact { grid-template-columns: 1fr; gap: 8px; }

  .lost-hero { min-height: 480px; }
  .lost-hero .top .note { display: none; }
  .lost-hero .sub-row { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 8px; }

  .site-footer { padding: 24px 20px 0; }
  .footer-info { flex-direction: column; align-items: flex-start; gap: 10px; }
}
