/* Angel Cowo & Sons — shared styles */

:root {
  --primary: #1d3237;
  --primary-deep: #0f1a1c;
  --accent: #eca218;
  --accent-deep: #c78609;
  --surface: #f7f4ee;
  --surface-2: #efeae0;
  --ink: #0f1a1c;
  --ink-2: #3c484b;
  --muted: #6b7479;
  --rule: #d9d2c4;
  --white: #ffffff;

  --font-display: 'Space Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --max: 1280px;
  --pad: clamp(20px, 4vw, 48px);
}

[data-theme="dark"] {
  --primary: #f7f4ee;
  --primary-deep: #ffffff;
  --surface: #0f1a1c;
  --surface-2: #1a2629;
  --ink: #f7f4ee;
  --ink-2: #c4c1b8;
  --muted: #8a938f;
  --rule: #2a363a;
  --white: #1d3237;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--primary-deep); }
::-moz-selection { background: var(--accent); color: var(--primary-deep); }

.justify { text-align: justify; text-justify: inter-word; hyphens: auto; }

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

a { color: inherit; text-decoration: none; }

/* ===== Typography ===== */
.display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 0.98;
}

h1.display { font-size: clamp(44px, 7.5vw, 104px); }
h2.display { font-size: clamp(36px, 5vw, 64px); }
h3.display { font-size: clamp(22px, 2.2vw, 32px); font-weight: 500; letter-spacing: -0.01em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px; height: 1px;
  background: var(--accent);
}

.lede { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.5; color: var(--ink-2); max-width: 62ch; }

.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; }

/* ===== Layout ===== */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

section { padding: clamp(72px, 10vw, 140px) 0; }

.rule { height: 1px; background: var(--rule); border: 0; }

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--surface), transparent 8%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--pad);
  max-width: var(--max);
  margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 12px;
}
.brand-logo {
  height: 40px;
  width: auto;
  display: block;
}
.brand-logo--footer {
  height: 56px;
}

.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-size: 14px;
  color: var(--ink-2);
  padding: 8px 0;
  position: relative;
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--accent);
}

/* Hamburger button */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none; border: none;
  cursor: pointer; padding: 8px;
}
.nav-burger span {
  display: block; width: 22px; height: 2px;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--surface);
  border-top: 1px solid var(--rule);
  padding: 16px var(--pad) 24px;
  gap: 0;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  transition: color .15s ease;
}
.nav-mobile a:hover, .nav-mobile a.active { color: var(--ink); }
.nav-mobile .btn {
  margin-top: 20px;
  justify-content: center;
  text-align: center;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  background: var(--primary);
  color: var(--surface);
  cursor: pointer;
  transition: transform .12s ease, background .15s ease;
}
.btn:hover { background: var(--primary-deep); transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: var(--primary-deep); }
.btn-accent:hover { background: var(--accent-deep); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-ghost:hover { background: transparent; border-color: var(--ink); }
.btn .arrow {
  display: inline-block;
  transition: transform .2s ease;
}
.btn:hover .arrow { transform: translateX(3px); }

/* ===== Placeholder imagery ===== */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      var(--surface-2) 0 8px,
      color-mix(in oklab, var(--surface-2), var(--primary) 5%) 8px 16px
    );
  color: var(--ink-2);
  overflow: hidden;
  display: flex; align-items: flex-end;
}
.ph::after {
  content: attr(data-label);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 14px;
  background: color-mix(in oklab, var(--surface), transparent 12%);
  border-top: 1px solid var(--rule);
  width: 100%;
}
.ph-corner {
  position: absolute;
  top: 12px; left: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface);
  padding: 4px 8px;
  border: 1px solid var(--rule);
}

/* ===== Footer ===== */
.footer {
  background: var(--primary);
  color: color-mix(in oklab, var(--surface), transparent 15%);
  padding: 80px 0 32px;
  margin-top: 60px;
}
[data-theme="dark"] .footer { background: var(--surface-2); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid color-mix(in oklab, var(--surface), transparent 80%);
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 18px;
  font-weight: 500;
}
.footer a, .footer p { font-size: 14px; color: color-mix(in oklab, var(--surface), transparent 20%); line-height: 1.8; }
.footer a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--surface), transparent 55%);
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  section { padding: clamp(48px, 8vw, 80px) 0; }
}

/* ===== Section header utility ===== */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 48px;
}
.section-head-copy { }
.section-head .lede { max-width: 38ch; }

/* ===== CTA section ===== */
.cta-section {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
}
.cta-section-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
@media (max-width: 860px) {
  .cta-section { grid-template-columns: 1fr; }
  .cta-section-actions { justify-content: flex-start; }
}

/* ===== Utility ===== */
.cluster { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 860px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Shared page-head (inner pages) */
.page-head {
  padding: clamp(60px, 8vw, 100px) 0 clamp(40px, 5vw, 60px);
  border-bottom: 1px solid var(--rule);
}
.page-head h1 { margin-top: 20px; }
.page-head .lede { margin-top: 24px; max-width: 52ch; }

/* ===== Tweaks panel ===== */
.tweaks {
  position: fixed;
  bottom: 20px; right: 20px;
  width: 300px;
  background: var(--surface);
  border: 1px solid var(--rule);
  box-shadow: 0 20px 60px -20px rgba(15, 26, 28, 0.25);
  z-index: 200;
  font-size: 13px;
  display: none;
}
.tweaks.open { display: block; }
.tweaks-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.tweaks-body { padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.tweak-row { display: flex; flex-direction: column; gap: 8px; }
.tweak-row label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.swatches { display: flex; gap: 8px; }
.swatch {
  width: 28px; height: 28px;
  border: 2px solid var(--rule);
  cursor: pointer;
  padding: 0;
}
.swatch.active { border-color: var(--ink); }
.tweak-row select, .tweak-row input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 13px;
}
.tweak-seg {
  display: flex;
  border: 1px solid var(--rule);
}
.tweak-seg button {
  flex: 1;
  padding: 8px;
  background: transparent;
  border: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}
.tweak-seg button.active { background: var(--ink); color: var(--surface); }
