/* keithmelton.com — shared styles */

:root {
  --bg: #f6f0e6;
  --surface: #fcf8f1;
  --ink: #1f1b16;
  --ink-muted: #4f4940;
  --ink-soft: #5c564c;
  --gold: #7a5723;
  --gold-soft: #c4a46a;
  --gold-wash: rgba(122, 87, 35, 0.12);
  --line: rgba(31, 27, 22, 0.1);
  --shadow: 0 1px 2px rgba(31, 27, 22, 0.04), 0 8px 24px rgba(31, 27, 22, 0.05);
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, sans-serif;
  --measure: 40rem;
  --wide: 48rem;
  --radius: 1rem;
  --header-pad: clamp(1.5rem, 4vw, 2.25rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16130f;
    --surface: #1f1b16;
    --ink: #f3ede3;
    --ink-muted: #c3bbb0;
    --ink-soft: #a79f93;
    --gold: #e0c48a;
    --gold-soft: #c4a46a;
    --gold-wash: rgba(224, 196, 138, 0.12);
    --line: rgba(243, 237, 227, 0.12);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 28px rgba(0, 0, 0, 0.28);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: light dark;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Soft wash + faint paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 50% -15%, rgba(196, 164, 106, 0.22), transparent 58%),
    radial-gradient(ellipse 70% 45% at 100% 110%, rgba(122, 87, 35, 0.07), transparent 55%),
    radial-gradient(ellipse 50% 40% at 0% 80%, rgba(122, 87, 35, 0.05), transparent 50%),
    var(--bg);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.45 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

@media (prefers-color-scheme: dark) {
  body::after {
    opacity: 0.2;
    mix-blend-mode: overlay;
  }
}

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

a {
  color: var(--gold);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

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

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

.wrap {
  width: min(calc(100% - 2.5rem), var(--wide));
  margin-inline: auto;
}

.site-header {
  padding: var(--header-pad) 0 0;
  display: flex;
  justify-content: center;
}

.monogram {
  width: 3.4rem;
  height: 3.4rem;
  color: var(--ink);
}

.monogram svg {
  width: 100%;
  height: 100%;
}

main {
  flex: 1;
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.hero {
  width: min(calc(100% - 2.5rem), var(--measure));
  margin: 0 auto;
  padding: clamp(1.75rem, 5.5vw, 3.25rem) 0 clamp(2rem, 5vw, 2.85rem);
  text-align: center;
}

.hero h1 {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: clamp(2.85rem, 9.5vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.tagline {
  margin: 0 auto 1.6rem;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  line-height: 1.35;
  color: var(--ink-muted);
}

.rule {
  width: 2.75rem;
  height: 1px;
  margin: 0 auto 1.75rem;
  background: var(--gold-soft);
  border: 0;
}

.intro {
  margin: 0;
  color: var(--ink-muted);
  font-size: clamp(1.05rem, 1.6vw, 1.15rem);
  line-height: 1.7;
  text-wrap: pretty;
}

.interests {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  width: min(calc(100% - 2.5rem), 47.5rem);
  max-width: 760px;
  margin: 0 auto clamp(2.25rem, 5vw, 3.1rem);
  padding: 0;
  list-style: none;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.3rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 100%;
}

.icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.7rem;
  background: var(--gold-wash);
  color: var(--gold);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.card h2 {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: 1.22rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--ink);
}

.card p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

.soon,
.contact {
  width: min(calc(100% - 2.5rem), var(--measure));
  margin-inline: auto;
  text-align: center;
}

.soon {
  margin-bottom: 2.15rem;
  padding: 1.35rem 1.25rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 0.45rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.soon p,
.contact p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 1.05rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.contact {
  margin-bottom: 0;
}

.site-footer {
  padding: 1.35rem 0 2rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.site-footer p {
  margin: 0;
}

/* 404 */
.not-found {
  width: min(calc(100% - 2.5rem), 28rem);
  margin: 0 auto;
  padding: clamp(3rem, 10vw, 6.5rem) 0 clamp(3rem, 10vw, 5rem);
  text-align: center;
}

.not-found h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: clamp(2.4rem, 7vw, 3.5rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.not-found p {
  margin: 0 0 1.75rem;
  color: var(--ink-muted);
}

.home-link {
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--gold-soft);
  padding-bottom: 0.1rem;
}

.home-link:hover {
  border-bottom-color: var(--ink);
}

@media (max-width: 560px) {
  .interests {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .card {
    padding: 1.1rem 1.15rem 1.2rem;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.95rem;
  }

  .card-copy {
    min-width: 0;
  }

  .card h2 {
    margin-top: 0;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 14vw, 3.4rem);
  }
}

@media (max-width: 380px) {
  .wrap,
  .hero,
  .interests,
  .soon,
  .contact,
  .not-found {
    width: min(calc(100% - 2rem), var(--wide));
  }
}
