/* Printuitive — coming-soon landing page.
   Visual reference: DESIGN2.md (Swiss-inspired minimalism). Colours are provisional;
   change them in the "Colour" block below and the whole page follows. */

/* ---------- Fonts (self-hosted, SIL Open Font Licence — see /fonts) ---------- */

@font-face {
  font-family: "Inter Tight";
  src: url("/fonts/inter-tight-latin-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */

:root {
  /* Colour: Printuitive palette */
  --color-linen: #f6f1e8;     /* page background */
  --color-oat: #e6dac6;       /* panels and quiet surfaces */
  --color-teal: #0f3240;      /* headings, lines, dark fills */
  --color-kiln: #c44a22;      /* accent */
  --color-graphite: #3c4a50;  /* body text (8.1:1 on linen) */
  --color-error: #9b1c1c;     /* form errors only, kept distinct from kiln */

  /* Colour roles: components use these, not the raw colours above.
     Linen on kiln is 4.3:1, so on kiln keep text large (see .launch). */
  --bg: var(--color-linen);
  --ink: var(--color-teal);
  --text: var(--color-graphite);
  --line: var(--color-teal);
  --surface: var(--color-oat);
  --field-bg: var(--color-linen);
  --placeholder: var(--color-graphite);
  --accent: var(--color-kiln);
  --on-accent: var(--color-linen);
  --on-ink: var(--color-linen);
  --ink-hover: var(--color-graphite);
  --error: var(--color-error);

  /* Typography (approved) */
  --display: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --text-caption: 0.875rem;   /* 14px */
  --text-body: 1.0625rem;     /* 17px */
  --text-lead: clamp(1.125rem, 1rem + 0.45vw, 1.375rem);
  --text-section: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);
  --text-display: clamp(2.75rem, 0.9rem + 7.6vw, 7.5rem);

  /* Spacing: 6px base unit */
  --space-6: 6px;
  --space-12: 12px;
  --space-18: 18px;
  --space-24: 24px;
  --space-36: 36px;
  --space-48: 48px;
  --space-72: 72px;
  --space-96: 96px;
  --section-gap: clamp(72px, 6vw + 36px, 132px);
  --band-gap: clamp(48px, 2.4vw + 30px, 72px); /* equal space above and below the launch band */

  /* Layout */
  --page-max: 1200px;
  --gutter: clamp(24px, 4vw, 48px);
  --column-gap: 24px;
  --bar-height: 72px;

  /* Shape */
  --radius-control: 10px;
  --radius-panel: 16px;
  --rule: 1px solid var(--line);

  --ease: 150ms ease;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.011em;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
p,
dl,
dd {
  margin: 0;
}

a {
  color: inherit;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

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

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: absolute;
  top: var(--space-12);
  left: var(--space-12);
  z-index: 10;
  padding: var(--space-12) var(--space-18);
  background: var(--ink);
  color: var(--on-ink);
  border-radius: var(--radius-control);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- Links ---------- */

.text-link {
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
  transition: text-decoration-thickness var(--ease), text-underline-offset var(--ease);
}

.text-link:hover {
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.nav-link {
  font-weight: 500;
  text-decoration: none;
  text-underline-offset: 0.24em;
}

.nav-link:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

/* ---------- Wordmark ---------- */

.wordmark {
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.025em;
  line-height: 1;
  text-decoration: none;
}

/* ---------- Header ---------- */

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: var(--bar-height);
}

/* ---------- Hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--bar-height));
  min-height: calc(100svh - var(--bar-height));
}

.hero__body {
  flex: 1;
  container-type: inline-size;
  display: grid;
  align-content: end; /* any spare height goes above the name, so the gap above the band stays exact */
  gap: var(--space-36);
  padding-block: var(--space-24) var(--band-gap);
}

.hero__body > * {
  min-width: 0;
}

/* The company name: Inter Tight Bold, sized in container units to span the content width. */
.hero__name {
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 22.75cqi;
  line-height: 0.8;
  /* -0.025em keeps "ri" and "it" from touching while the other pairs stay tight */
  letter-spacing: -0.025em;
  white-space: nowrap;
  /* Optical nudge: the P's side bearing would otherwise look indented at this size */
  margin-left: -0.045em;
}

.hero__sub {
  display: grid;
  gap: var(--space-24) var(--column-gap);
  padding-top: var(--space-24);
  border-top: var(--rule);
}

.hero__tagline {
  max-width: 13em;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.75rem, 1.1rem + 2.4vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

/* One statement per line */
.hero__tagline span {
  display: block;
}

.hero__intro {
  max-width: 34ch;
  text-wrap: pretty; /* avoids a single word on the last line */
  font-size: var(--text-lead);
  line-height: 1.45;
  letter-spacing: -0.015em;
}

.footer__label {
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: -0.006em;
  line-height: 1.4;
}

/* ---------- Launch announcement ---------- */

/* Full-width accent band closing the hero. The heading is sized in container units:
   full width on phones and tablets, the left seven columns on desktop, so it always
   stays smaller than the company name above it. */
.launch {
  /* Lines and focus rings inside the band are linen so they show against kiln */
  --line: var(--on-accent);
  --rule: 1px solid var(--on-accent);
  background: var(--accent);
  color: var(--on-accent);
}

.launch ::selection {
  background: var(--ink);
  color: var(--on-ink);
}

.launch__inner {
  container-type: inline-size;
  display: grid;
  gap: var(--space-24);
  padding-block: var(--space-36) var(--space-36);
}

.launch__inner > * {
  min-width: 0;
}

.launch__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 13.7cqi;
  line-height: 0.85;
  letter-spacing: -0.025em;
  white-space: nowrap;
  margin-left: -0.04em;
}

.launch__aside {
  display: grid;
  gap: var(--space-18);
  align-items: end;
  padding-top: var(--space-24);
  border-top: var(--rule);
}

.launch__text {
  max-width: 30ch;
  /* Linen on kiln is 4.3:1, so this text is kept large and bold (WCAG large text) */
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

/* Ink variant for use on the accent band (defined with .button below, so doubled for priority) */
.button.button--ink {
  background: var(--ink);
  color: var(--on-ink);
  border-color: var(--ink);
  text-decoration: none;
  gap: var(--space-12);
  white-space: nowrap;
}

.button.button--ink:hover {
  background: var(--ink-hover);
  border-color: var(--ink-hover);
  color: var(--on-ink);
}

/* ---------- Contact ---------- */

.contact {
  padding-block: 0 var(--section-gap);
}

.contact__grid {
  display: grid;
  gap: var(--space-48) var(--column-gap);
  padding-top: var(--band-gap);
}

.contact__grid > * {
  min-width: 0;
}

.contact__intro {
  display: grid;
  gap: var(--space-18);
  align-content: start;
}

.section-title {
  margin-bottom: var(--space-6);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--text-section);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.contact__intro p {
  max-width: 36ch;
  font-size: var(--text-lead);
  line-height: 1.45;
}

/* ---------- Form ---------- */

.form {
  display: grid;
  gap: var(--space-18);
  padding: var(--space-24);
  background: var(--surface);
  border-radius: var(--radius-panel);
}

/* Labels sit inside each one-row box like placeholder text and disappear once the field
   has a value. They remain real <label>s, so screen readers still announce them. */
.field {
  position: relative;
  display: grid;
  gap: var(--space-6);
  --field-height: 48px;
}

.field label {
  position: absolute;
  top: 0;
  left: 13px;
  z-index: 1;
  display: flex;
  align-items: center;
  height: var(--field-height);
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  pointer-events: none; /* clicks pass through to the field */
  transition: opacity var(--ease);
}

.field:has(:not(:placeholder-shown):is(input, textarea)) label,
.field:has(select option[value=""]:not(:checked)) label {
  opacity: 0;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  margin: 0;
  min-height: var(--field-height);
  padding: var(--space-12);
  background: var(--field-bg);
  color: var(--text);
  border: var(--rule);
  border-radius: var(--radius-control);
  font: inherit;
  font-size: 1rem; /* 16px stops iOS zooming into fields */
  line-height: 1.4;
  letter-spacing: -0.011em;
  transition: box-shadow var(--ease);
}

/* One row to start, growing with the message (field-sizing where supported, script otherwise) */
.field textarea {
  max-height: 20rem;
  field-sizing: content;
  resize: vertical;
}

.field ::placeholder {
  color: var(--placeholder);
  opacity: 1;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  box-shadow: inset 0 0 0 1px var(--line);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--line);
  outline-offset: 2px;
  border-radius: var(--radius-control);
}

.field [aria-invalid="true"],
.field [aria-invalid="true"]:hover {
  border-color: var(--error);
  box-shadow: inset 0 0 0 1px var(--error);
}

.select {
  position: relative;
}

.select select {
  appearance: none;
  padding-right: var(--space-48);
  cursor: pointer;
}

.select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: var(--space-18);
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--text);
  border-bottom: 1.5px solid var(--text);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.field__hint,
.field__error {
  font-size: var(--text-caption);
  line-height: 1.4;
}

.field__error {
  color: var(--error);
  font-weight: 500;
}

/* Spam trap: kept off-screen rather than display:none so simple bots still fill it in. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__actions {
  padding-top: var(--space-6);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: var(--space-12) var(--space-24);
  /* Teal rather than kiln: linen on kiln (4.3:1) is too low for 16px button text */
  background: var(--ink);
  color: var(--on-ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius-control);
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.011em;
  cursor: pointer;
  transition: background-color var(--ease), color var(--ease);
}

.button:hover {
  background: var(--ink-hover);
  border-color: var(--ink-hover);
}

.button:active {
  transform: translateY(1px);
}

.button[disabled] {
  cursor: progress;
  background: var(--ink);
  color: var(--on-ink);
  opacity: 0.6;
  transform: none;
}

.form__status-region {
  margin-top: var(--space-18);
}

.form__status-region:empty {
  margin-top: 0;
}

.form__status {
  padding: var(--space-12) var(--space-18);
  background: var(--field-bg);
  border: var(--rule);
  border-radius: var(--radius-control);
  line-height: 1.45;
}

.form__status strong {
  font-weight: 600;
}

.form__status.is-error {
  border-color: var(--error);
  box-shadow: inset 0 0 0 1px var(--error);
}

/* ---------- Privacy and other text pages ---------- */

.site-header__bar--split {
  justify-content: space-between;
}

.legal {
  padding-block: var(--band-gap) var(--section-gap);
}

.legal__body {
  max-width: 68ch;
}

.legal__title {
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--text-section);
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.legal__meta {
  margin-top: var(--space-12);
  font-size: var(--text-caption);
}

.legal__body h2 {
  margin: var(--space-48) 0 var(--space-12);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.legal__body p,
.legal__body ul {
  margin: 0 0 var(--space-18);
}

.legal__meta + p {
  margin-top: var(--space-36);
  font-size: var(--text-lead);
}

.legal__body ul {
  padding-left: 1.25em;
}

.legal__body li + li {
  margin-top: var(--space-6);
}

.legal__body strong {
  color: var(--ink);
  font-weight: 600;
}

.legal__details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-6) var(--space-24);
  margin: 0 0 var(--space-18);
}

.legal__details dt {
  color: var(--ink);
  font-weight: 500;
}

@media (max-width: 639px) {
  .legal__details {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .legal__details dd + dt {
    margin-top: var(--space-12);
  }
}

/* ---------- Footer ---------- */

.footer__grid {
  display: grid;
  gap: var(--space-24) var(--column-gap);
  padding-block: var(--space-24) var(--space-48);
  border-top: var(--rule);
}

.footer__col {
  display: grid;
  gap: var(--space-6);
  align-content: start;
  justify-items: start;
}

/* Social icon links: 44px tap targets, official brand icons in currentColor */
.social {
  display: flex;
  gap: var(--space-6);
  margin: 0 0 0 -10px;
  padding: 0;
  list-style: none;
}

.social__link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--ink);
  border-radius: var(--radius-control);
  transition: color var(--ease), background-color var(--ease);
}

.social__link:hover {
  color: var(--accent);
  background: var(--surface);
}

.social__link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-12) var(--space-24);
  padding-block: var(--space-24) var(--space-36);
  border-top: var(--rule);
  font-size: var(--text-caption);
}

/* ---------- Tablet and up ---------- */

@media (min-width: 640px) {
  .launch__inner {
    gap: var(--space-36);
  }

  .launch__aside {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-24);
  }

  .form {
    padding: 30px; /* 5 × 6px base unit */
  }

  .button {
    width: auto;
  }

  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Desktop ---------- */

@media (min-width: 960px) {
  .hero__sub,
  .launch__inner,
  .contact__grid,
  .footer__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .hero__tagline {
    grid-column: 1 / span 7;
  }

  /* Introduction and launch text share one vertical axis (column 8) */
  .hero__intro {
    grid-column: 8 / -1;
    align-self: end;
  }

  .launch__inner {
    align-items: center;
    gap: var(--column-gap);
  }

  .launch__title {
    grid-column: 1 / span 7;
    font-size: 7.8cqi;
  }

  .launch__aside {
    grid-column: 8 / -1;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-18);
    justify-items: start;
    padding-top: 0;
    border-top: 0;
  }

  .contact__intro {
    grid-column: 1 / span 5;
  }

  .form {
    grid-column: 7 / -1;
  }

  .footer__col {
    grid-column: span 3;
  }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
