/* ============================================================
   ANALOG INTERFACE MACHINES — v3
   Tone: Rentec-quiet. One statement. Prose. No ornamentation.
   Type: Cormorant Garamond (statement) + DM Sans (everything else)
   Color: Near-white, dark ink, single muted accent
   ============================================================ */

:root {
  --white:        #fafaf8;
  --ink:          #1a1916;
  --ink-muted:    #5a5852;
  --ink-faint:    #9a9890;
  --rule:         #dddbd4;
  --accent:       #2d6b63;
}

[data-theme="dark"] {
  --white:        #151412;
  --ink:          #e2e0d9;
  --ink-muted:    #8a8880;
  --ink-faint:    #52504c;
  --rule:         #2a2926;
  --accent:       #3d9189;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --white:        #151412;
    --ink:          #e2e0d9;
    --ink-muted:    #8a8880;
    --ink-faint:    #52504c;
    --rule:         #2a2926;
    --accent:       #3d9189;
  }
}

/* re-open :root for non-color tokens */
:root {

  color-scheme: light dark;

  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body:    'DM Sans', 'Helvetica Neue', sans-serif;

  --max-w:        1100px;
  --side-pad:     clamp(1.5rem, 6vw, 4rem);

  --text-statement: clamp(1.5rem, 1.1rem + 1.6vw, 2.4rem);
  --text-label:     0.75rem;
  --text-body:      clamp(0.875rem, 0.85rem + 0.15vw, 1rem);
  --text-service-h: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-contact:   clamp(1.25rem, 1rem + 1vw, 1.75rem);
}

/* ── BASE ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 300;
  line-height: 1.7;
  min-height: 100dvh;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

::selection { background: #c8dbd8; }

:focus-visible {
  outline: 1.5px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ── HEADER ──────────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.75rem max(var(--side-pad), calc((100% - var(--max-w)) / 2));
  border-bottom: 1px solid var(--rule);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.logo svg { color: var(--ink); flex-shrink: 0; }

nav {
  display: flex;
  gap: 2rem;
}

nav a {
  font-size: var(--text-label);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  transition: color 140ms ease;
}

nav a:hover { color: var(--ink); }

/* ── THEME TOGGLE ───────────────────────────────────────── */
.theme-toggle {
  background: none;
  border: none;
  padding: 0;
  margin-left: 0.25rem;
  cursor: pointer;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  transition: color 140ms ease;
  line-height: 1;
}

.theme-toggle:hover { color: var(--ink); }

/* Show sun in dark mode (click to go light), moon in light mode (click to go dark) */
[data-theme="dark"] .icon-moon  { display: none; }
[data-theme="dark"] .icon-sun   { display: block; }
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* Default (no data-theme set yet): match OS preference */
:root:not([data-theme]) .icon-moon { display: block; }
:root:not([data-theme]) .icon-sun  { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .icon-moon { display: none; }
  :root:not([data-theme]) .icon-sun  { display: block; }
}

/* ── STATEMENT ───────────────────────────────────────────── */
.statement {
  padding: clamp(4rem, 10vw, 7rem) max(var(--side-pad), calc((100% - var(--max-w)) / 2));
  border-bottom: 1px solid var(--rule);
}

.statement-inner {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.statement-body {
  font-family: var(--font-display);
  font-size: var(--text-statement);
  font-weight: 300;
  line-height: 1.45;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.statement-sub {
  font-size: var(--text-body);
  font-weight: 300;
  color: var(--ink-muted);
  max-width: 60ch;
  line-height: 1.7;
}

/* ── RULE ────────────────────────────────────────────────── */
.rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* ── SHARED SECTION STRUCTURE ────────────────────────────── */
.work,
.clients,
.contact {
  padding: clamp(2.5rem, 6vw, 4.5rem) max(var(--side-pad), calc((100% - var(--max-w)) / 2));
}

.work-inner,
.clients-inner,
.contact-inner {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0 clamp(2rem, 4vw, 4rem);
}

.section-label {
  font-size: var(--text-label);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 0.2em;
  line-height: 1;
}

/* ── WORK GRID ───────────────────────────────────────────── */
.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3rem;
}

.work-item h3 {
  font-family: var(--font-body);
  font-size: var(--text-service-h);
  font-weight: 450;
  color: var(--ink);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.work-item p {
  font-size: var(--text-body);
  font-weight: 300;
  color: var(--ink-muted);
  line-height: 1.72;
}

/* ── CLIENTS ─────────────────────────────────────────────── */
.clients-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.clients-list li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.clients-list a {
  font-size: var(--text-service-h);
  font-weight: 450;
  color: var(--ink);
  transition: color 140ms ease;
}

.clients-list a:hover { color: var(--accent); }

.clients-list span {
  font-size: calc(var(--text-body) - 0.0625rem);
  font-weight: 300;
  color: var(--ink-muted);
}

/* ── CONTACT ─────────────────────────────────────────────── */
.contact-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-body > p {
  font-size: var(--text-body);
  font-weight: 300;
  color: var(--ink-muted);
  max-width: 52ch;
  line-height: 1.75;
}

.contact-email {
  font-family: var(--font-display);
  font-size: var(--text-contact);
  font-weight: 300;
  color: var(--accent);
  letter-spacing: -0.01em;
  line-height: 1;
  transition: opacity 140ms ease;
}

.contact-email:hover { opacity: 0.7; }

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.25rem max(var(--side-pad), calc((100% - var(--max-w)) / 2));
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-footer span {
  font-size: var(--text-label);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .work-inner,
  .clients-inner,
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 1.25rem 0;
  }

  .work,
  .clients,
  .contact {
    padding-left: var(--side-pad);
    padding-right: var(--side-pad);
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .site-footer {
    flex-direction: column;
    gap: 0.25rem;
  }
}

.logo-initials { display: none; }

@media (max-width: 420px) {
  .logo-full     { display: none; }
  .logo-initials { display: inline; }
}


