/* ==========================================================================
   Department of One — departmentofone.co
   Single stylesheet. No build step. Design tokens at the top.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------ */
:root {
  /* Ink */
  --ink:          #14171c;
  --ink-2:        #3a4149;   /* body text                        7.9:1 on paper */
  --ink-3:        #6b7280;   /* muted / captions                 4.8:1 on paper */

  /* Ground */
  --paper:        #fbfaf7;
  --surface:      #ffffff;
  --surface-2:    #f4f2ec;
  --line:         #e5e2da;
  --line-strong:  #d4d0c4;

  /* Accent — gold-bronze. Rules, marks, large display only. */
  --accent:       #b07d2b;
  --accent-ink:   #7a5312;   /* accessible for small text        6.5:1 on paper */
  --accent-soft:  #f6efe1;

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Scale */
  --step--1: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-0:  clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-1:  clamp(1.125rem, 1.07rem + 0.28vw, 1.25rem);
  --step-2:  clamp(1.375rem, 1.27rem + 0.5vw, 1.625rem);
  --step-3:  clamp(1.75rem, 1.55rem + 0.95vw, 2.25rem);
  --step-4:  clamp(2.125rem, 1.75rem + 1.85vw, 3.25rem);

  /* Space */
  --gutter: clamp(1.25rem, 0.9rem + 1.6vw, 2.5rem);
  --section: clamp(3.5rem, 2.5rem + 4.5vw, 6.5rem);

  /* Shape */
  --radius:    14px;
  --radius-sm: 10px;
  --shadow:    0 1px 2px rgba(20, 23, 28, 0.04), 0 8px 24px -12px rgba(20, 23, 28, 0.14);
  --shadow-lift: 0 2px 4px rgba(20, 23, 28, 0.05), 0 18px 40px -18px rgba(20, 23, 28, 0.22);

  --max: 68rem;
  --measure: 38rem;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

ul { margin: 0; padding: 0; }

/* --- Accessibility ----------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

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

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

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

.wrap--narrow { max-width: 46rem; }

.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(2.5rem, 1.8rem + 3vw, 4.5rem); }
.section--surface { background: var(--surface); border-block: 1px solid var(--line); }

.measure { max-width: var(--measure); }

.stack > * + * { margin-top: 1.15em; }

/* --- Header / nav ------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 247, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  padding-block: 0.5rem;
}
.wordmark .mark {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-1px);
}
.wordmark:hover { color: var(--ink); }

.nav-list {
  display: none;
  list-style: none;
  align-items: center;
  gap: 0.25rem;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.85rem;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.18s ease, background-color 0.18s ease;
}
.nav-list a:hover { color: var(--ink); background: var(--surface-2); }
.nav-list a[aria-current="page"] { color: var(--ink); }
.nav-list a[aria-current="page"]::after {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 0.4rem;
}

.nav-cta { display: none; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 0.9rem;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle:hover { background: var(--surface-2); }

.nav-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.nav-panel[data-open="true"] { display: block; }
.nav-panel ul { list-style: none; padding-block: 0.5rem 1rem; }
.nav-panel a {
  display: flex;
  align-items: center;
  min-height: 52px;
  font-size: var(--step-0);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.nav-panel li:last-child a { border-bottom: 0; }
.nav-panel a[aria-current="page"] { color: var(--accent-ink); }

@media (min-width: 60rem) {
  .nav-list { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .nav-panel { display: none !important; }
}

/* --- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn--primary {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn--primary:hover { background: #000; transform: translateY(-1px); box-shadow: var(--shadow-lift); color: #fff; }

.btn--ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { background: var(--surface-2); border-color: var(--ink-3); color: var(--ink); }

.btn--quiet {
  background: transparent;
  color: var(--ink);
  padding-inline: 0;
  min-height: 44px;
  font-weight: 600;
  border: 0;
}
.btn--quiet::after { content: "→"; transition: transform 0.18s ease; }
.btn--quiet:hover::after { transform: translateX(3px); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* --- Type helpers ------------------------------------------------------ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 1rem;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--accent);
}

.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-2);
}

.tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--step-1);
  color: var(--ink-2);
}

.fine {
  font-size: var(--step--1);
  color: var(--ink-3);
}

.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin-block: var(--section) 0;
}

/* --- Hero -------------------------------------------------------------- */
.hero {
  padding-block: clamp(3.5rem, 2rem + 7vw, 7rem) clamp(3rem, 2rem + 4vw, 5rem);
}
.hero h1 { max-width: 16ch; }
.hero .lede { max-width: 34rem; margin-top: 1.25rem; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--ink-3);
  list-style: none;
}
.hero-meta li { display: flex; align-items: center; gap: 0.5rem; }
.hero-meta li::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* --- Cards / grids ----------------------------------------------------- */
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 44rem) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 44rem) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 1.1rem + 1vw, 2rem);
  box-shadow: var(--shadow);
}

.card h3 { margin-bottom: 0.4rem; }

/* Price cards */
.price-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.price-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}
.price-card__head h3 { margin: 0; font-size: var(--step-2); }
.price {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  color: var(--accent-ink);
  white-space: nowrap;
}
.price-card--feature {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, var(--accent-soft), var(--surface) 42%);
}

/* Work component cards */
.component {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.component__status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  align-self: flex-start;
  margin-top: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink-3);
}
.component__status::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Social-graphic thumbnails on the Work page */
.graphic-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  margin-top: 1.1rem;
}
.graphic-grid a {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.graphic-grid a:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}
.graphic-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* --- Aside / note ------------------------------------------------------ */
.note {
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: clamp(1.15rem, 1rem + 0.6vw, 1.6rem) clamp(1.25rem, 1rem + 0.8vw, 1.8rem);
}

/* --- CTA band ---------------------------------------------------------- */
.cta-band {
  background: var(--ink);
  color: #d7dade;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #b9bec5; }
.cta-band .btn--primary { background: #fff; color: var(--ink); }
.cta-band .btn--primary:hover { background: var(--accent-soft); color: var(--ink); }
.cta-band :focus-visible { outline-color: var(--accent); }

/* --- Form -------------------------------------------------------------- */
.form {
  display: grid;
  gap: 1.15rem;
  margin-top: 2rem;
}
@media (min-width: 40rem) {
  .form { grid-template-columns: 1fr 1fr; }
  .field--full { grid-column: 1 / -1; }
}

.field { display: flex; flex-direction: column; gap: 0.4rem; }

.field label {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink);
}
.field .opt { font-weight: 400; color: var(--ink-3); }

.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: var(--step-0);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  min-height: 48px;
  width: 100%;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field textarea { min-height: 9rem; resize: vertical; line-height: 1.6; }

.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--ink-3); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent-ink);
  box-shadow: 0 0 0 3px rgba(176, 125, 43, 0.18);
  outline: none;
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline: none; }

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'%3E%3Cpath d='M4.2 6.2a1 1 0 0 1 1.4 0L8 8.6l2.4-2.4a1 1 0 1 1 1.4 1.4l-3.1 3.1a1 1 0 0 1-1.4 0L4.2 7.6a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 18px;
  padding-right: 2.4rem;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

/* Honeypot */
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* --- Thank-you --------------------------------------------------------- */
.thanks {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 62vh;
  padding-block: var(--section);
}
.thanks__mark {
  width: 60px; height: 60px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--line-strong);
  margin: 0 auto 1.5rem;
  color: var(--accent-ink);
}

/* --- Footer ------------------------------------------------------------ */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-block: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  font-size: var(--step--1);
  color: var(--ink-3);
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 44rem) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

.footer-nav { list-style: none; display: grid; gap: 0.15rem; }
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--ink-2);
  text-decoration: none;
}
.footer-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.footer-title {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 0.6rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

/* --- Print ------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .btn-row, .cta-band { display: none; }
  body { background: #fff; }
}
