/* PhiWeft site styles. One file, no build step. */

/* Archivo, self-hosted variable font (weight and width axes). License: fonts/OFL.txt */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;

  /* Palette */
  --paper: #F5F1E8;       /* warm off-white */
  --paper-deep: #ECE6D8;  /* one step down, for the example panel */
  --ink: #132444;         /* navy, from the logo wordmark */
  --ink-soft: #46546A;    /* secondary text, warp threads */
  --rule: #D6CEBD;        /* hairlines */
  --teal: #236B78;        /* deep teal accent, from the logo mark */

  /* Spacing and type both step by the golden ratio (and its square root) */
  --s-2: 0.382rem;
  --s-1: 0.618rem;
  --s0: 1rem;
  --s1: 1.618rem;
  --s2: 2.618rem;
  --s3: 4.236rem;
  --s4: 6.854rem;

  --t-small: 0.875rem;
  --t-body: 1.0625rem;
  --t-lead: 1.272rem;
  --t-h3: 1.4rem;
  --t-h2: clamp(1.75rem, 1.2rem + 2vw, 2.618rem);
  --t-h1: clamp(2.5rem, 1.1rem + 5.6vw, 4.6rem);

  --measure: 34rem;
  --page: 72rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

*, *::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(--paper);
  color: var(--ink);
  font-family: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: var(--t-body);
  line-height: 1.6;
  font-stretch: 100%;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }

h1, h2, h3 { font-stretch: 112%; font-weight: 600; text-wrap: balance; }
h1 { font-size: var(--t-h1); line-height: 1.02; letter-spacing: -0.028em; }
h2 { font-size: var(--t-h2); line-height: 1.1; letter-spacing: -0.02em; }
h3 { font-size: var(--t-h3); line-height: 1.2; letter-spacing: -0.01em; }
p { text-wrap: pretty; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--teal); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: var(--gutter); top: -4rem;
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--ink);
  padding: var(--s-1) var(--s0); text-decoration: none; z-index: 10;
}
.skip:focus { top: var(--s-1); }

/* Header */
.masthead {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s1);
  padding-block: var(--s1);
}
.wordmark {
  display: inline-flex; align-items: center; gap: var(--s-1);
  font-stretch: 118%; font-weight: 650; font-size: 1.272rem;
  letter-spacing: -0.015em; text-decoration: none;
}
.wordmark img { height: 2.2rem; width: auto; flex: none; display: block; }
.nav { display: flex; gap: var(--s1); font-size: 0.95rem; }
.nav a { text-decoration: none; padding-block: var(--s-2); border-bottom: 1px solid transparent; }
.nav a:hover { border-bottom-color: var(--teal); }

/* Hero */
.hero { padding-block: var(--s3) var(--s4); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.618fr 1fr;
  gap: var(--s2);
  align-items: center;
  margin-top: var(--s1);
}
.hero h1 span { display: block; }
.hero-sub {
  font-size: var(--t-lead); line-height: 1.5;
  max-width: 32rem;
}
.hero-actions {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--s0) var(--s1);
  margin-top: var(--s2);
}
.hero-aside { color: var(--ink-soft); font-size: 0.95rem; max-width: 17rem; line-height: 1.45; }
.weave { width: 100%; height: auto; display: block; }

.button {
  display: inline-block;
  background: var(--ink); color: var(--paper);
  font-weight: 600; font-stretch: 106%;
  padding: 0.9rem 1.5rem;
  border-radius: 3px;
  text-decoration: none;
  transition: background-color 120ms ease;
}
.button:hover { background: var(--teal); }
@media (prefers-reduced-motion: reduce) { .button { transition: none; } }

/* Sections share one golden split: heading in the narrow column, content in the wide one */
.section { padding-block: var(--s3); border-top: 1px solid var(--rule); }
.split {
  display: grid;
  grid-template-columns: 1fr 1.618fr;
  gap: var(--s2);
  align-items: start;
}
.section-intro { color: var(--ink-soft); margin-top: var(--s0); max-width: 22rem; }

/* What PhiWeft does */
.services { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2) var(--s2); }
.service { border-top: 2px solid var(--ink); padding-top: var(--s0); }
.service p { margin-top: var(--s-1); }
.service-ai {
  grid-column: 1 / -1;
  border-top: 1px solid var(--rule);
  display: grid; grid-template-columns: 1fr 1.618fr; gap: var(--s1);
  color: var(--ink-soft);
}
.service-ai h3 { font-size: 1.125rem; font-weight: 600; color: var(--ink); }
.service-ai p { margin-top: 0; font-size: 1rem; }

.when { margin-top: var(--s2); }
.when h3 { font-size: 1.125rem; }
.when ul { margin-top: var(--s-1); border-top: 1px solid var(--rule); }
.when li {
  padding-block: var(--s-1);
  border-bottom: 1px solid var(--rule);
  padding-left: var(--s1);
  position: relative;
}
.when li::before {
  content: ""; position: absolute; left: 0; top: 1.25em;
  width: 0.9rem; height: 2px; background: var(--teal);
}

/* Example engagement */
.example { background: var(--paper-deep); border-top: 0; }
.example + .section { border-top: 0; }
.example-flag {
  display: inline-block;
  border: 1px solid var(--ink);
  border-radius: 3px;
  padding: 0.3rem 0.7rem;
  font-size: var(--t-small); font-weight: 600; line-height: 1.35;
  margin-bottom: var(--s0);
}
.example-title { font-size: var(--t-lead); font-weight: 600; font-stretch: 106%; line-height: 1.3; }
.steps { margin-top: var(--s1); counter-reset: step; }
.step {
  counter-increment: step;
  display: grid; grid-template-columns: var(--s2) 1fr; gap: var(--s0);
  padding-block: var(--s1);
  border-top: 1px solid var(--ink);
}
.step::before {
  content: counter(step);
  font-size: var(--t-h2); font-weight: 300; font-stretch: 112%;
  line-height: 0.95; color: var(--teal);
}
.step p { margin-top: var(--s-2); max-width: var(--measure); }
.scope {
  margin: 0; padding-top: var(--s1); border-top: 1px solid var(--ink);
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s1) var(--s2);
}
.scope dt { font-weight: 650; font-stretch: 106%; }
.scope dd { margin-top: var(--s-2); color: var(--ink-soft); }

/* Who's behind it */
.bio p { max-width: var(--measure); }
.bio p + p { margin-top: var(--s0); }
.bio .name { font-size: var(--t-lead); line-height: 1.5; }

/* Contact */
.contact { padding-block: var(--s4); }
.contact h2 { max-width: 20ch; }
.contact-grid { display: grid; grid-template-columns: 1.618fr 1fr; gap: var(--s2); align-items: end; margin-top: var(--s2); }
.contact-grid p { max-width: var(--measure); }
.contact-card { border-top: 2px solid var(--teal); padding-top: var(--s0); }
.contact-label { font-size: var(--t-small); color: var(--ink-soft); }
.contact-email { font-size: var(--t-lead); font-weight: 650; font-stretch: 112%; overflow-wrap: anywhere; }

/* Footer */
.footer { border-top: 1px solid var(--rule); padding-block: var(--s1) var(--s2); font-size: var(--t-small); color: var(--ink-soft); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-1) var(--s1); }

/* Phone and narrow tablet */
@media (max-width: 52rem) {
  .hero { padding-block: var(--s2) var(--s3); }
  .hero-grid, .split, .contact-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: var(--s1); }
  .split { gap: var(--s1); }
  .section { padding-block: var(--s2); }
  .contact { padding-block: var(--s3); }
  .section-intro { max-width: var(--measure); }
}
@media (max-width: 40rem) {
  .nav a:not(.nav-contact) { display: none; }
  .services, .scope { grid-template-columns: 1fr; gap: var(--s1); }
  .service-ai { grid-template-columns: 1fr; gap: var(--s-2); }
  .hero-actions .button { width: 100%; text-align: center; }
  .hero-aside { max-width: none; }
}
