/* ==========================================================================
   Matereal — Portable Design System
   Extracted from matereal-world/website (css/style.css) for reuse in other
   Matereal projects. Contains tokens + base + the most commonly reused
   components (buttons, form fields, cards, badges). Page-specific styles
   (nav, footer, hero, journal, applications tabs, etc.) are intentionally
   left out — copy those from the source site only if this new app needs
   the exact same layout.

   Setup:
   1. Put fonts/*.otf next to this file (or adjust the url() paths below).
   2. Link this file, then add your own page-specific CSS after it.
   ========================================================================== */

:root {
  /* Brand color */
  --ink: #131019;
  --ink-soft: #56515f;
  --ink-faint: #8b8794;
  --paper: #ffffff;
  --paper-tint: #f6f4fa;
  --line: #e4e0eb;

  --purple-900: #29045c;
  --purple-700: #4800bd;
  --purple-600: #5c17d6;
  --purple-500: #6100ff;
  --purple-100: #efe6ff;

  --green-400: #76e69f;
  --green-600: #1f9c56;

  --focus-ring: #6100ff;

  /* Typography */
  --font-display: "Alliance No.1", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Alliance No.1", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: clamp(0.72rem, 0.7rem + 0.12vw, 0.78rem);
  --step-0: clamp(0.9rem, 0.86rem + 0.2vw, 0.98rem);
  --step-1: clamp(1.02rem, 0.95rem + 0.32vw, 1.12rem);
  --step-2: clamp(1.35rem, 1.25rem + 0.5vw, 1.65rem);
  --step-3: clamp(1.95rem, 1.7rem + 1.2vw, 2.55rem);
  --step-4: clamp(2.5rem, 2.1rem + 1.9vw, 3.3rem);
  --step-5: clamp(3.3rem, 2.7rem + 2.9vw, 4.5rem);
  --step-6: clamp(3.9rem, 3.1rem + 3.9vw, 5.7rem);

  /* Spacing (4px base) */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4.5rem;
  --sp-9: 6.5rem;
  --sp-10: 9rem;

  --radius-sm: 3px;
  --radius-md: 5px;
  --radius-lg: 6px;
  --radius-pill: 999px;

  --container: 1240px;
  --container-narrow: 820px;

  --shadow-sm: 0 1px 2px rgba(19, 16, 25, 0.06), 0 1px 1px rgba(19, 16, 25, 0.04);
  --shadow-md: 0 12px 32px -12px rgba(41, 4, 92, 0.22);
  --shadow-lg: 0 24px 64px -20px rgba(41, 4, 92, 0.3);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   Fonts (self-hosted — only Light is used on matereal.world itself;
   Regular/Medium are included here in case this app wants more weight
   contrast between headings and body text)
   ========================================================================== */

@font-face {
  font-family: "Alliance No.1";
  src: url("fonts/AllianceNo1-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alliance No.1";
  src: url("fonts/AllianceNo1-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alliance No.1";
  src: url("fonts/AllianceNo1-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   Reset + base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; }
body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h2 { font-size: var(--step-3); }
p { text-wrap: pretty; }

@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;
  }
}

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

::selection { background: var(--purple-500); color: #fff; }

/* ==========================================================================
   Layout helpers
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}
.container--narrow { max-width: var(--container-narrow); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple-700);
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  /* On the live site this is masked to a small star-mark.png instead of a
     circle — see images/star-mark.png if you want to match that exactly:
     background-color: currentColor;
     -webkit-mask: url("images/star-mark.png") center / contain no-repeat;
     mask: url("images/star-mark.png") center / contain no-repeat; */
}

.lede {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 60ch;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.01em;
  padding: 0.9rem 1.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--purple-700);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn--primary:hover { background: var(--purple-500); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--purple-700); color: var(--purple-700); }

.btn--light {
  background: #fff;
  color: var(--purple-700);
}
.btn--light:hover { background: var(--green-400); color: var(--ink); }

.btn svg { width: 1.05em; height: 1.05em; flex-shrink: 0; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ==========================================================================
   Badges / tags
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--green-400);
  color: var(--ink);
}
.badge--muted { background: var(--paper-tint); color: var(--ink-soft); border: 1px solid var(--line); }
.badge--dark { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.card h3 { font-size: var(--step-1); margin-bottom: var(--sp-2); }
.card p { color: var(--ink-soft); font-size: var(--step--1); }

/* ==========================================================================
   Forms — the important part for an intake form
   ========================================================================== */

.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-4); }
.form-field label { font-size: var(--step--1); font-weight: 600; }
.form-field input, .form-field textarea, .form-field select {
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: var(--step-0);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  border-color: var(--purple-700);
  box-shadow: 0 0 0 4px var(--purple-100);
  outline: none;
}
.form-field textarea { resize: vertical; min-height: 140px; }
.form-row { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-note { font-size: var(--step--1); color: var(--ink-faint); margin-top: var(--sp-3); }
.form-status { font-size: var(--step--1); font-weight: 600; margin-top: var(--sp-3); }
.form-status[data-state="success"] { color: var(--green-600); }
.form-status[data-state="error"] { color: #c0273c; }
