/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:        #f5efe4;   /* warm cream */
  --bg-2:      #ebe0cd;   /* sand */
  --paper:     #fffdf9;
  --ink:       #241f19;   /* warm near-black */
  --ink-soft:  #3c352b;
  --ink-mute:  #7d7161;
  --accent:    #b8583a;   /* terracotta */
  --accent-2:  #5c6b47;   /* moss — secondary accent */
  --accent-ink:#fdf8f0;
  --line:      rgba(36,31,25,0.14);
  --line-soft: rgba(36,31,25,0.09);
  --shadow-sm: 0 1px 2px rgba(36,31,25,.05);
  --shadow-md: 0 1px 2px rgba(36,31,25,.05), 0 14px 32px -18px rgba(36,31,25,.35);
  --shadow-accent: 0 1px 2px rgba(36,31,25,.05), 0 18px 36px -18px rgba(184,88,58,.45);

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Inter", -apple-system, "Segoe UI", sans-serif;

  --radius:    16px;
  --radius-sm: 10px;
  --radius-lg: 22px;

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --nav-h: 76px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
}
body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
p { text-wrap: pretty; }
h1, h2, h3, h4 {
  font-family: var(--display);
  text-wrap: balance;
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-weight: 600;
}
::selection { background: var(--accent); color: var(--accent-ink); }

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

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--ink); color: var(--bg);
  z-index: 9999; font-weight: 600; font-size: .85rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }

.container {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 720px)  { .container { padding-inline: 2rem; } }
@media (min-width: 1280px) { .container { padding-inline: 2.5rem; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--body);
  font-size: .78rem; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-mute);
}
.eyebrow .num { color: var(--accent); font-weight: 700; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .9em 1.7em;
  font-family: var(--body); font-weight: 600; font-size: .92rem;
  letter-spacing: .01em;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  transition: background .2s var(--ease-out), color .2s var(--ease-out), border-color .2s var(--ease-out), transform .15s var(--ease-out);
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-on-dark { border-color: rgba(253,248,240,.4); color: var(--bg); }
.btn-on-dark:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:active { transform: scale(.97); }

.hairline-top    { border-top: 1px solid var(--line); }
.hairline-bottom { border-bottom: 1px solid var(--line); }

/* =============================================================
   4. Nav
   ============================================================= */
.nav {
  position: sticky; top: 0; z-index: 500;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(245,239,228,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(10px)) { .nav { background: var(--bg); } }
.nav-inner {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.nav-logo {
  font-family: var(--display); font-style: italic; font-weight: 600;
  font-size: 1.25rem; letter-spacing: -0.01em;
  display: flex; align-items: baseline; gap: .3em;
}
.nav-logo .dot { color: var(--accent); }
.nav-links {
  display: none;
  align-items: center; gap: 2rem;
}
.nav-links a {
  font-size: .9rem; font-weight: 500;
  position: relative;
  padding-block: .25rem;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 2px; background: var(--accent); border-radius: 2px;
  transition: right .25s var(--ease-out);
}
.nav-links a:hover::after { right: 0; }
@media (min-width: 960px) { .nav-links { display: flex; } }

.nav-cta { display: none; }
@media (min-width: 960px) { .nav-cta { display: inline-flex; } }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
}
@media (min-width: 960px) { .nav-toggle { display: none; } }
.nav-toggle-bars { position: relative; width: 18px; height: 12px; }
.nav-toggle-bars span {
  position: absolute; left: 0; width: 100%; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .25s var(--ease-out), opacity .25s var(--ease-out);
}
.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 5px; }
.nav-toggle-bars span:nth-child(3) { top: 10px; }
.is-menu-open .nav-toggle-bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.is-menu-open .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.is-menu-open .nav-toggle-bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 400;
  background: var(--ink); color: var(--bg);
  display: flex; flex-direction: column; justify-content: center; gap: 1.5rem;
  padding: 2rem 1.5rem;
  transform: translateY(-100%);
  transition: transform .35s var(--ease-out);
}
.is-menu-open .mobile-menu { transform: translateY(0); }
.mobile-menu a { font-family: var(--display); font-style: italic; font-size: 2rem; font-weight: 600; }
.mobile-menu a:hover { color: var(--accent); }
.mobile-menu .btn { align-self: flex-start; margin-top: 1rem; font-family: var(--body); font-style: normal; }
@media (min-width: 960px) { .mobile-menu { display: none; } }

/* =============================================================
   5. Sections — general
   ============================================================= */
section { padding-block: clamp(3.5rem, 8vw, 7rem); }

.section-head {
  display: flex; flex-direction: column; gap: .9rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.section-title { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.section-title .hl { color: var(--accent); font-style: italic; }

/* -------------------------------------------------------------
   Hero
   ------------------------------------------------------------- */
.hero { padding-top: clamp(3rem, 8vw, 5.5rem); padding-bottom: 0; }
.hero-grid {
  display: grid; gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 7fr 5fr; gap: 3rem; align-items: end; }
}
.hero-title {
  font-size: clamp(2.6rem, 7.2vw, 5.6rem);
  line-height: .98;
  max-width: 14ch;
}
.hero-title .hl { color: var(--accent); font-style: italic; }
.hero-side {
  display: flex; flex-direction: column; gap: 1.5rem;
  padding-bottom: .5rem;
}
.hero-sub { font-size: 1.05rem; color: var(--ink-soft); max-width: 42ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }

.hero-marquee {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg-2);
}
.hero-marquee-track {
  display: flex; width: max-content;
  animation: marquee 30s linear infinite;
}
.hero-marquee-track span {
  display: inline-flex; align-items: center;
  padding-block: .85rem;
  padding-inline: 1.25rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .05em;
  color: var(--ink-soft); white-space: nowrap;
}
.hero-marquee-track span::after { content: "·"; margin-left: 1.25rem; color: var(--accent); font-weight: 700; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* -------------------------------------------------------------
   Photo band
   ------------------------------------------------------------- */
.photo-band {
  position: relative;
  height: clamp(220px, 34vw, 420px);
  overflow: hidden;
}
.photo-band img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 40%;
  filter: saturate(1.1) contrast(1.03);
}
.photo-band-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end;
  background: linear-gradient(0deg, rgba(36,31,25,.78) 0%, rgba(36,31,25,.1) 55%, transparent 75%);
  padding: clamp(1.25rem, 4vw, 2.5rem);
}
.photo-band-line {
  color: var(--accent-ink);
  font-family: var(--display);
  font-size: clamp(1.6rem, 4.4vw, 2.8rem);
  font-weight: 600; line-height: 1.08;
  max-width: 720px;
}
.photo-band-line .hl { color: #e8a487; font-style: italic; }

/* -------------------------------------------------------------
   Manifesto
   ------------------------------------------------------------- */
.manifesto-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .manifesto-grid { grid-template-columns: 3fr 9fr; gap: 2.5rem; }
}
.manifesto-num { font-family: var(--display); font-style: italic; font-size: clamp(3rem, 8vw, 5rem); font-weight: 600; color: var(--accent); line-height: .8; }
.manifesto-text { font-size: clamp(1.15rem, 2.2vw, 1.5rem); line-height: 1.5; color: var(--ink-soft); max-width: 62ch; }

/* -------------------------------------------------------------
   Pricing
   ------------------------------------------------------------- */
.pricing-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.5rem;
}
@media (min-width: 960px) { .pricing-grid { grid-template-columns: repeat(3, 1fr); } }

.plan {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(1.75rem, 3vw, 2.25rem);
  display: flex; flex-direction: column; gap: 1.75rem;
  position: relative;
}
.plan-featured { border: 2px solid var(--accent); box-shadow: var(--shadow-accent); }
.plan-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--accent-ink);
  font-size: .72rem; font-weight: 700; letter-spacing: .06em;
  padding: .45em 1.1em; border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.plan-name { font-size: 1.4rem; }
.plan-price { display: flex; align-items: baseline; gap: .4rem; }
.plan-price strong { font-family: var(--display); font-size: clamp(2.1rem, 4vw, 2.6rem); font-weight: 600; }
.plan-price span { font-size: .85rem; color: var(--ink-mute); }

.plan-features { display: flex; flex-direction: column; }
.plan-feature {
  display: flex; flex-direction: column; gap: .2rem;
  padding-block: .8rem;
  border-top: 1px solid var(--line-soft);
}
.plan-feature:first-child { border-top: none; }
.plan-feature-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-mute);
}
.plan-feature-value { font-size: .92rem; }
.plan-feature-value.is-off { color: var(--ink-mute); }

.plan-maint {
  padding-top: 1.1rem; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: baseline; gap: .5rem;
  font-size: .85rem;
}
.plan-maint strong { font-size: 1rem; }

.plan .btn { width: 100%; }

.plan-actions { display: flex; flex-direction: column; gap: .6rem; }
.plan-note { font-size: .74rem; color: var(--ink-mute); text-align: center; line-height: 1.5; }

/* -------------------------------------------------------------
   Branchen (industries) grid
   ------------------------------------------------------------- */
.branchen-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 720px)  { .branchen-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .branchen-grid { grid-template-columns: repeat(3, 1fr); } }
.branchen-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.5rem, 2.2vw, 1.9rem); display: flex; flex-direction: column; gap: .7rem;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.branchen-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.branchen-num { font-family: var(--display); font-style: italic; font-size: 1.1rem; font-weight: 600; color: var(--accent); letter-spacing: .01em; }
.branchen-name { font-size: 1.08rem; font-weight: 700; font-family: var(--body); }
.branchen-copy { font-size: .88rem; color: var(--ink-soft); line-height: 1.55; }

/* -------------------------------------------------------------
   Fit section
   ------------------------------------------------------------- */
.fit-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 960px) { .fit-grid { grid-template-columns: repeat(3, 1fr); } }
.fit-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.5rem, 2.4vw, 2rem); display: flex; flex-direction: column; gap: .9rem;
}
.fit-letter { font-family: var(--display); font-style: italic; font-size: 2.2rem; font-weight: 600; color: var(--accent); }
.fit-name { font-size: 1.15rem; font-family: var(--body); font-weight: 700; }
.fit-copy { font-size: .92rem; color: var(--ink-soft); line-height: 1.55; }

/* -------------------------------------------------------------
   Why us / stats
   ------------------------------------------------------------- */
.why-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: start; }
@media (min-width: 960px) { .why-grid { grid-template-columns: 5fr 7fr; gap: 3rem; } }

.why-photo {
  width: 100%; max-width: 320px; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  filter: saturate(1.05);
  margin-bottom: 1.5rem;
}
.why-list { display: flex; flex-direction: column; gap: 1.1rem; }
.why-item { display: flex; gap: .9rem; align-items: flex-start; padding-block: .9rem; border-top: 1px solid var(--line-soft); }
.why-item:first-child { border-top: none; }
.why-item-mark { color: var(--accent); font-weight: 700; }
.why-item p { font-size: .95rem; color: var(--ink-soft); }

.stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); align-content: start;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
@media (min-width: 540px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat {
  padding: 1.5rem 1rem; text-align: center; display: flex; flex-direction: column; gap: .3rem;
  border-top: 1px solid var(--line-soft); border-left: 1px solid var(--line-soft);
}
.stat:nth-child(1) { border-left: none; }
@media (max-width: 539px) { .stat:nth-child(odd) { border-left: none; } .stat:nth-child(1), .stat:nth-child(2) { border-top: none; } }
@media (min-width: 540px) { .stat { border-top: none; } }
.stat-num { font-family: var(--display); font-size: clamp(1.8rem, 3.4vw, 2.4rem); font-weight: 600; }
.stat-num .hl { color: var(--accent); font-style: italic; }
.stat-label { font-size: .72rem; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .04em; }

/* -------------------------------------------------------------
   Contact
   ------------------------------------------------------------- */
.contact { background: var(--ink); color: var(--accent-ink); }
.contact-bg {
  background-image: linear-gradient(rgba(36,31,25,.90), rgba(36,31,25,.93)), url("assets/img/contact-bg.webp");
  background-size: cover;
  background-position: center;
}
.contact-inner { display: flex; flex-direction: column; gap: 1.75rem; }
.contact-title { font-size: clamp(2rem, 5vw, 3.2rem); max-width: 18ch; }
.contact-email {
  font-family: var(--display); font-style: italic;
  font-size: clamp(1.5rem, 4.4vw, 2.6rem); font-weight: 600;
  display: inline-flex; align-items: baseline; gap: .3em; width: fit-content;
  border-bottom: 2px solid var(--accent);
}
.contact-email:hover { color: #e8a487; }
.contact-meta { display: flex; flex-wrap: wrap; gap: 1.5rem; font-size: .9rem; color: rgba(253,248,240,.65); }
.contact-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: .5rem; }

/* -------------------------------------------------------------
   Footer
   ------------------------------------------------------------- */
.footer { padding-block: 2rem; }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  font-size: .82rem; color: var(--ink-mute);
}
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a:hover { color: var(--ink); }

/* =============================================================
   6. Effects
   ============================================================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }

[data-count-to] { font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------
   AI chat widget
   ------------------------------------------------------------- */
.ai-chat { position: fixed; right: 1rem; bottom: 1rem; z-index: 700; }
@media (min-width: 720px) { .ai-chat { right: 1.5rem; bottom: 1.5rem; } }

.ai-chat-toggle {
  display: inline-flex; align-items: center; gap: .6em;
  background: var(--accent); color: var(--accent-ink);
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  padding: .85em 1.4em;
  font-family: var(--body); font-weight: 600; font-size: .88rem;
  box-shadow: var(--shadow-md);
  transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.ai-chat-toggle:hover { background: var(--ink); border-color: var(--ink); transform: translateY(-2px); }
.ai-chat-toggle-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent-ink);
  animation: aiPulse 1.8s ease-in-out infinite;
}
@keyframes aiPulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.is-chat-open .ai-chat-toggle { display: none; }

.ai-chat-panel {
  position: fixed; right: 1rem; bottom: 1rem; left: 1rem;
  z-index: 701;
  width: auto; max-width: 400px; height: min(70vh, 560px);
  margin-left: auto;
  display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
@media (min-width: 540px) { .ai-chat-panel { left: auto; } }
@media (min-width: 720px) { .ai-chat-panel { right: 1.5rem; bottom: 1.5rem; } }
.ai-chat-panel[hidden] { display: none; }

.ai-chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.1rem;
  background: var(--bg-2);
}
.ai-chat-name { font-family: var(--display); font-style: italic; font-weight: 600; font-size: 1.1rem; }
.ai-chat-sub { font-size: .72rem; color: var(--ink-mute); }
.ai-chat-close {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%; font-size: 1.1rem; line-height: 1; color: var(--ink);
}
.ai-chat-close:hover { border-color: var(--accent); color: var(--accent); }

.ai-chat-messages {
  flex: 1; overflow-y: auto;
  padding: 1rem 1.1rem;
  display: flex; flex-direction: column; gap: .75rem;
}
.ai-msg { font-size: .88rem; line-height: 1.5; max-width: 88%; padding: .65em .9em; border-radius: var(--radius-sm); }
.ai-msg-bot { align-self: flex-start; background: var(--bg-2); border-bottom-left-radius: 3px; }
.ai-msg-user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 3px; }
.ai-msg-pending { align-self: flex-start; color: var(--ink-mute); font-style: normal; }

.ai-chat-suggestions {
  display: flex; flex-wrap: wrap; gap: .5rem;
  padding: 0 1.1rem .9rem;
}
.ai-chip {
  border: 1px solid var(--line); border-radius: 999px; padding: .4em .8em;
  font-size: .74rem; font-family: var(--body);
}
.ai-chip:hover { background: var(--bg-2); border-color: var(--accent); }
.ai-chat-suggestions[hidden] { display: none; }

.ai-chat-form {
  display: flex; gap: .5rem;
  padding: .85rem 1.1rem;
  border-top: 1px solid var(--line);
}
.ai-chat-input {
  flex: 1; min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .7em 1em;
  font-family: var(--body); font-size: .88rem;
  background: var(--bg); color: var(--ink);
}
.ai-chat-input:focus { outline: none; border-color: var(--accent); }
.ai-chat-send {
  width: 42px; flex-shrink: 0;
  border: 0; background: var(--accent); color: var(--accent-ink);
  border-radius: 50%;
  font-size: 1.1rem;
}
.ai-chat-send:hover { background: var(--ink); }
.ai-chat-send:disabled { opacity: .5; cursor: default; }

/* =============================================================
   7. Responsive helpers
   ============================================================= */
@media (min-width: 720px)  { section { padding-block: clamp(4rem, 7vw, 6.5rem); } }

/* =============================================================
   8. Reduced motion — only the intrusive
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-marquee-track { animation: none; }
  .ai-chat-toggle-dot { animation: none; }
}
