/* Grestia — studio site. Light-first, dark-aware, no build step required. */

:root {
  --ink: #1d2b3a;
  --ink-soft: #3c4c5e;
  --paper: #f7f5f1;
  --paper-raised: #ffffff;
  --border: #e2ddd3;
  --accent: #b8860b;
  --accent-strong: #8a6508;
  --accent-contrast: #1d2b3a;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29, 43, 58, 0.06), 0 8px 24px -12px rgba(29, 43, 58, 0.18);
  --max-width: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eef1f4;
    --ink-soft: #b9c2cc;
    --paper: #12181f;
    --paper-raised: #1a222c;
    --border: #2a3441;
    --accent: #e7c873;
    --accent-strong: #f2d999;
    --accent-contrast: #12181f;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  --ink: #eef1f4;
  --ink-soft: #b9c2cc;
  --paper: #12181f;
  --paper-raised: #1a222c;
  --border: #2a3441;
  --accent: #e7c873;
  --accent-strong: #f2d999;
  --accent-contrast: #12181f;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--font-serif); line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; color: var(--ink-soft); }
.lede { font-size: 1.15rem; max-width: 46em; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 1.1rem;
}
.brand-name { font-size: 1.05rem; letter-spacing: 0.01em; }

.nav-links { display: flex; gap: 28px; }
.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--accent-strong); }

.nav-toggle { display: none; }
.nav-burger { display: none; }

@media (max-width: 640px) {
  .nav-burger {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
  }
  .nav-burger span,
  .nav-burger span::before,
  .nav-burger span::after {
    content: "";
    display: block;
    width: 20px;
    height: 2px;
    background: var(--ink);
    position: relative;
    transition: transform 0.2s ease;
  }
  .nav-burger span::before { position: absolute; top: -6px; }
  .nav-burger span::after { position: absolute; top: 6px; }

  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--paper-raised);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-links a {
    padding: 14px 24px;
    border-top: 1px solid var(--border);
  }
  .nav-toggle:checked ~ .nav-links {
    max-height: 220px;
  }
}

/* Hero */
.hero {
  padding: 96px 0 72px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-strong);
  margin: 0 0 14px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--ink); color: var(--paper); }
.button-primary:hover { background: var(--accent-strong); color: var(--accent-contrast); }
.button-ghost { border-color: var(--border); color: var(--ink); }
.button-ghost:hover { border-color: var(--accent); }

/* Sections */
.section { padding: 72px 0; }
.section-alt {
  background: var(--paper-raised);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pillars {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.pillars h3 { margin-bottom: 6px; }
.pillars p { margin: 0; }

/* Products */
.product-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 32px;
}
.product-card {
  display: block;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
a.product-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.product-card-placeholder {
  box-shadow: none;
  border-style: dashed;
  opacity: 0.85;
}
.product-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.product-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--accent);
  font-family: var(--font-serif);
  font-weight: 700;
  flex: none;
}
.product-card h3 { margin: 0; }
.product-card p { margin-bottom: 14px; }
.product-link { font-weight: 600; color: var(--accent-strong); }

/* Contact */
.contact-list {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin: 28px 0 0;
}
.contact-list dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.contact-list dd { margin: 0; font-size: 1.05rem; }
.contact-list a { text-decoration: none; border-bottom: 1px solid var(--accent); }
.todo { color: var(--ink-soft); font-style: italic; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.footer-row a { text-decoration: none; color: var(--ink-soft); }
.footer-row a:hover { color: var(--accent-strong); }
.site-footer p { margin: 0; }
