/* ==========================================================================
   Sumac — sumac.fyi
   Warm, earthy, grounded. Premium through restraint.
   Sumac Red is an accent, not the base.
   ========================================================================== */

/* ===== DESIGN TOKENS ===== */
:root {
  /* Brand */
  --color-sumac: #7A1E2C;        /* Sumac Red — accent, used sparingly */
  --color-sumac-dark: #5E1622;
  --color-sumac-tint: #F2E7E9;
  --color-tan: #A67C52;          /* warm earth accent */
  --color-tan-dark: #8A6540;
  --color-tan-tint: #F1EAE1;

  /* Neutrals — warm, matte */
  --color-bg: #F7F5F2;
  --color-surface: #FFFFFF;
  --color-ink: #1F1F1F;
  --color-ink-deep: #2B1B17;     /* deep roasted brown for dark sections */
  --color-text-muted: #6B6B6B;
  --color-border: #E6E0D6;

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Spacing & layout */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3.5rem;
  --space-xl: 6rem;
  --space-2xl: 8rem;
  --max-width: 1140px;
  --max-width-narrow: 760px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(43, 27, 23, 0.06);
  --shadow-md: 0 6px 24px rgba(43, 27, 23, 0.08);
  --shadow-lg: 0 16px 48px rgba(43, 27, 23, 0.12);

  /* Grain texture (subtle, organic) */
  --grain: 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.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-ink);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--color-sumac); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-sm);
  color: var(--color-ink);
}

h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 var(--space-sm); }

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

.wrap-narrow { max-width: var(--max-width-narrow); }

/* Eyebrow — small-caps section label */
.eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-tan-dark);
  margin-bottom: 0.75rem;
}

.section-intro {
  max-width: 620px;
  color: var(--color-text-muted);
  font-size: 1.125rem;
}

/* ===== BUTTONS ===== */
.btn-cta,
.btn-secondary {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.btn-cta {
  background-color: var(--color-sumac);
  color: #F7F5F2;
  border: 1px solid var(--color-sumac);
}
.btn-cta:hover {
  background-color: var(--color-sumac-dark);
  border-color: var(--color-sumac-dark);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-ink);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover {
  border-color: var(--color-tan);
  color: var(--color-tan-dark);
  text-decoration: none;
}

/* ===== HEADER & NAVIGATION ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: rgba(247, 245, 242, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(230, 224, 214, 0.7);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}
.logo:hover { text-decoration: none; }

.logo-text {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav a:not(.btn-cta) {
  color: var(--color-ink);
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:not(.btn-cta):hover {
  color: var(--color-sumac);
  text-decoration: none;
}

.main { padding-top: 4.25rem; }

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: var(--space-2xl) 0 var(--space-xl);
  background:
    radial-gradient(1100px 500px at 80% -10%, var(--color-tan-tint) 0%, transparent 60%),
    radial-gradient(900px 420px at 10% 110%, var(--color-sumac-tint) 0%, transparent 55%),
    var(--color-bg);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.hero h1 { margin-bottom: 1.25rem; }
.hero h1 em {
  font-style: italic;
  color: var(--color-sumac);
}

.hero-sub {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin-bottom: var(--space-md);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

.hero-note {
  margin-top: var(--space-md);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ===== PROOF STRIP ===== */
.proof-strip {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background-color: var(--color-surface);
  padding: 1.4rem 0;
}
.proof-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 2.5rem;
}
.proof-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.proof-names {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.5rem;
}
.proof-names span {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--color-ink);
  opacity: 0.85;
}

/* ===== SECTIONS ===== */
.section { padding: var(--space-xl) 0; }
.section-alt { background-color: var(--color-surface); }

.section-head { margin-bottom: var(--space-lg); }

/* ===== FEATURE CARDS ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--color-tan);
}
.section-alt .feature-card { background-color: var(--color-bg); }

.feature-card .glyph {
  width: 2.6rem;
  height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background-color: var(--color-tan-tint);
  color: var(--color-tan-dark);
  margin-bottom: 1.1rem;
  font-size: 1.2rem;
}

.feature-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--color-text-muted);
  font-size: 0.98rem;
  margin: 0;
}

/* ===== SPLIT FEATURE (deep dives) ===== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.split-copy .eyebrow { margin-bottom: 0.6rem; }
.split-copy h2 { margin-bottom: 1rem; }
.split-copy p { color: var(--color-text-muted); }

.split-list {
  list-style: none;
  padding: 0;
  margin: var(--space-sm) 0 0;
}
.split-list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.75rem;
  color: var(--color-ink);
}
.split-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background-color: var(--color-tan);
}
.split-list li strong { font-weight: 600; }

/* Decorative panel standing in for a product screenshot */
.panel {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem;
}
.panel-chrome {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.panel-chrome span {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background-color: var(--color-border);
}
.panel-lines > div {
  height: 0.85rem;
  border-radius: 4px;
  background-color: var(--color-bg);
  margin-bottom: 0.7rem;
}
.panel-lines > div:nth-child(1) { width: 55%; background-color: var(--color-sumac-tint); }
.panel-lines > div:nth-child(2) { width: 90%; }
.panel-lines > div:nth-child(3) { width: 80%; }
.panel-lines > div:nth-child(4) { width: 85%; }
.panel-lines > div:nth-child(5) { width: 40%; background-color: var(--color-tan-tint); }

/* ===== DARK SECTION — "your instance" ===== */
.section-deep {
  background-color: var(--color-ink-deep);
  color: #EFE9E2;
  position: relative;
  overflow: hidden;
}
.section-deep::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  pointer-events: none;
}
.section-deep .wrap { position: relative; z-index: 1; }
.section-deep h2, .section-deep h3 { color: #F7F5F2; }
.section-deep .eyebrow { color: var(--color-tan); }
.section-deep p { color: rgba(239, 233, 226, 0.75); }

.deep-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: var(--space-lg);
}
.deep-item h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.deep-item p { font-size: 0.98rem; margin: 0; }
.deep-item .rule {
  width: 2.25rem;
  height: 2px;
  background-color: var(--color-tan);
  margin-bottom: 1rem;
}

/* ===== EVERYTHING LIST (broad capabilities) ===== */
.everything-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem 2.5rem;
  margin-top: var(--space-md);
}
.everything-grid span {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.5rem;
  color: var(--color-ink);
  font-size: 0.98rem;
  border-bottom: 1px solid var(--color-border);
}
.everything-grid span::before {
  content: "·";
  position: absolute;
  left: 0.25rem;
  color: var(--color-sumac);
  font-weight: 700;
}

/* ===== CTA SECTION ===== */
.cta-section {
  padding: var(--space-2xl) 0;
  text-align: center;
  background:
    radial-gradient(800px 400px at 50% 120%, var(--color-sumac-tint) 0%, transparent 60%),
    var(--color-bg);
}
.cta-section h2 { margin-bottom: 1rem; }
.cta-section p {
  color: var(--color-text-muted);
  max-width: 520px;
  margin: 0 auto var(--space-md);
  font-size: 1.15rem;
}

/* ===== CONTACT FORM ===== */
.contact-form {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}

.contact-form iframe { display: none; }

.cf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.cf-field {
  display: block;
  margin-bottom: 1rem;
}

.cf-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-ink);
  margin-bottom: 0.4rem;
}

.cf-optional {
  font-weight: 400;
  letter-spacing: 0;
  color: var(--color-text-muted);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-ink);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.contact-form textarea { resize: vertical; }

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #A9A29A; }

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-tan);
  box-shadow: 0 0 0 3px var(--color-tan-tint);
}

.cf-fieldset {
  border: 0;
  margin: 0 0 1rem;
  padding: 0;
}
.cf-fieldset .cf-label { margin-bottom: 0.6rem; padding: 0; }

.cf-choice {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.35rem 0;
  font-size: 0.98rem;
  color: var(--color-ink);
  cursor: pointer;
}
.cf-choice input { accent-color: var(--color-sumac); margin-top: 0.3rem; }

.cf-field.is-invalid input,
.cf-field.is-invalid textarea { border-color: var(--color-sumac); }

.cf-error {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--color-sumac);
}

.cf-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.25rem;
  margin-top: var(--space-sm);
}

.cf-submit {
  font-family: inherit;
  cursor: pointer;
}
.cf-submit:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.cf-note {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.cf-thanks,
.cf-failed {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background-color: var(--color-surface);
  box-shadow: var(--shadow-sm);
  padding: var(--space-md);
  text-align: center;
}
.cf-thanks:focus,
.cf-failed:focus { outline: none; }
.cf-thanks h3,
.cf-failed h3 { margin-bottom: 0.4rem; }
.cf-thanks p,
.cf-failed p { color: var(--color-text-muted); margin: 0; }
.cf-failed { border-color: var(--color-sumac); }

@media (max-width: 600px) {
  .cf-row { grid-template-columns: 1fr; gap: 0; }
}

/* ===== LEGAL / CONTENT PAGES ===== */
.legal-page {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: var(--space-lg) 1.5rem var(--space-xl);
}
.legal-page h1 { font-size: 2.25rem; }
.legal-page h2 { font-size: 1.4rem; margin-top: var(--space-md); }
.legal-page .updated {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
}

/* ===== FOOTER ===== */
.site-footer {
  background-color: var(--color-ink-deep);
  color: rgba(239, 233, 226, 0.75);
  padding: var(--space-lg) 0 var(--space-md);
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(239, 233, 226, 0.15);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.footer-logo span {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: #F7F5F2;
}
.footer-brand p { max-width: 320px; margin: 0; }

.footer-col h4 {
  color: #F7F5F2;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 0.9rem;
}
.footer-col a {
  display: block;
  color: rgba(239, 233, 226, 0.75);
  margin-bottom: 0.55rem;
}
.footer-col a:hover { color: var(--color-tan); text-decoration: none; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: var(--space-sm);
  font-size: 0.85rem;
  color: rgba(239, 233, 226, 0.55);
}
.footer-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--color-tan);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .deep-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .everything-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .site-nav a:not(.btn-cta) { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .everything-grid { grid-template-columns: 1fr; }
  .hero { padding: var(--space-xl) 0 var(--space-lg); }
  .section { padding: var(--space-lg) 0; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ===== UTILITIES ===== */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
