/* ============================================
   GOLEM COMMERCE — Design System
   ============================================ */

:root {
  /* Colors */
  --bg: #FAFAF7;
  --bg-pure: #FFFFFF;
  --bg-tint: #F3F4F0;
  --ink: #141614;
  --ink-2: #3A3D3A;
  --ink-3: #6B6F6B;
  --ink-4: #9B9F9B;
  --line: #E5E7E2;
  --line-2: #EFF0EC;
  --green: #3F8F6F;
  --green-dark: #2F6F55;
  --green-tint: #EAF3EE;
  --green-deep: #1F4A38;

  /* Type */
  --font: "Geist", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;

  /* Layout */
  --max: 1240px;
  --gutter: clamp(24px, 4vw, 56px);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 24px;

  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

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

/* ============================================
   Typography
   ============================================ */

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-dark);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  display: inline-block;
}

h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
  text-wrap: balance;
}

.h-display {
  font-size: clamp(44px, 6.4vw, 92px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.h-1 {
  font-size: clamp(36px, 4.4vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.h-2 {
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.h-3 {
  font-size: clamp(20px, 1.6vw, 24px);
  letter-spacing: -0.015em;
  line-height: 1.2;
  font-weight: 600;
}

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

.body {
  font-size: 17px;
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 65ch;
}

.body-sm {
  font-size: 15px;
  color: var(--ink-3);
  line-height: 1.6;
}

/* ============================================
   Layout
   ============================================ */

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  width: 100%;
}

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

.section-tight {
  padding: clamp(56px, 6vw, 96px) 0;
}

.divider {
  height: 1px;
  background: var(--line);
  border: none;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: all 0.2s var(--ease);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--green);
  color: white;
}

.btn-primary:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--ink);
  color: white;
}

.btn-dark:hover {
  background: #000;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--bg-pure);
}

.btn-sm {
  padding: 10px 18px;
  font-size: 14px;
}

.btn-lg {
  padding: 18px 28px;
  font-size: 16px;
}

.btn .arr {
  transition: transform 0.2s var(--ease);
}

.btn:hover .arr {
  transform: translateX(3px);
}

/* ============================================
   Navigation
   ============================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}

.nav.scrolled {
  border-bottom-color: var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  line-height: 1;
}

.logo .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--green);
  color: white;
  border-radius: 9px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.04em;
  flex-shrink: 0;
  position: relative;
}

.logo .mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
  pointer-events: none;
}

.logo .wordmark {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}

.logo .name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.12em;
  line-height: 1;
  color: var(--ink);
}

.logo .sub {
  font-weight: 400;
  color: var(--ink-3);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: all 0.15s var(--ease);
}

.nav-links a:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.04);
}

.nav-links a.active {
  color: var(--ink);
}

.nav-links .cta {
  background: var(--green);
  color: white;
  margin-left: 8px;
  padding: 10px 18px;
}

.nav-links .cta:hover {
  background: var(--green-dark);
  color: white;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    gap: 2px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open a { padding: 14px 16px; border-radius: 10px; }
  .nav-links.open .cta { margin-left: 0; }
}

/* ============================================
   Footer
   ============================================ */

footer {
  background: var(--ink);
  color: #C9CCC9;
  padding: 80px 0 32px;
  font-size: 14.5px;
  line-height: 1.6;
}

footer .container {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
}

footer .col-brand .logo {
  color: white;
  margin-bottom: 18px;
}

footer .col-brand .logo .sub {
  color: #9b9f9b;
}

footer .col-brand p {
  color: #9b9f9b;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.6;
}

footer h5 {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9b9f9b;
  margin-bottom: 18px;
  font-family: var(--mono);
}

footer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

footer a {
  color: #C9CCC9;
  transition: color 0.15s var(--ease);
}

footer a:hover {
  color: white;
}

footer .ext::after {
  content: " ↗";
  color: #6B6F6B;
}

.footer-bottom {
  border-top: 1px solid #2A2D2A;
  padding-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px;
  justify-content: space-between;
  font-size: 13px;
  color: #7B7F7B;
}

.footer-bottom .disclaimer {
  max-width: 64ch;
  line-height: 1.55;
}

.footer-bottom .copy {
  white-space: nowrap;
}

.footer-bottom a {
  color: #9b9f9b;
}

@media (max-width: 820px) {
  footer .container {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
  footer .col-brand { grid-column: 1 / -1; }
}

/* ============================================
   Cards / generic surfaces
   ============================================ */

.card {
  background: var(--bg-pure);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.2s var(--ease);
}

.card:hover {
  border-color: #d4d8d0;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -12px rgba(20, 22, 20, 0.08);
}

/* ============================================
   Form controls
   ============================================ */

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: -0.005em;
}

.field input,
.field textarea,
.field select {
  background: var(--bg-pure);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 15px;
  color: var(--ink);
  transition: all 0.15s var(--ease);
  width: 100%;
  outline: none;
}

.field input:hover,
.field textarea:hover,
.field select:hover {
  border-color: #d4d8d0;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(63, 143, 111, 0.12);
}

.field textarea {
  resize: vertical;
  min-height: 140px;
  font-family: inherit;
  line-height: 1.55;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%236B6F6B' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.field.error input,
.field.error textarea,
.field.error select {
  border-color: #C8553D;
}

.field .err-msg {
  font-size: 12.5px;
  color: #C8553D;
  display: none;
}

.field.error .err-msg {
  display: block;
}

/* ============================================
   Utility — placeholder visuals
   ============================================ */

.placeholder {
  background:
    repeating-linear-gradient(
      135deg,
      var(--line-2) 0,
      var(--line-2) 1px,
      transparent 1px,
      transparent 10px
    ),
    var(--bg-pure);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 24px;
  text-align: center;
}

.placeholder.dark {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255,255,255,0.04) 0,
      rgba(255,255,255,0.04) 1px,
      transparent 1px,
      transparent 10px
    ),
    var(--ink);
  color: #C9CCC9;
  border-color: #2A2D2A;
}

/* ============================================
   Animation helpers
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
