/* ===== Arc Agency — Design Tokens (v3: quiet luxury) ===== */
:root {
  --ink: #1C1B19;
  --ink-2: #262421;
  --paper: #EDE8DF;
  --paper-2: #E2DCD0;
  --accent: #24382D;
  --accent-bright: #34503F;
  --stone: #6E675C;
  --line: rgba(28,27,25,0.16);
  --line-dark: rgba(237,232,223,0.14);
  --display: 'Cormorant Garamond', Georgia, serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 16px;
}

h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: 0; }

/* ===== Side trajectory arc ===== */
.arc-track {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: min(55vh, 380px);
  z-index: 5;
  pointer-events: none;
}
.arc-track svg { width: 100%; height: 100%; }
.arc-track-bg { fill: none; stroke: var(--line); stroke-width: 1; }
.arc-track-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-dasharray: 460;
  stroke-dashoffset: 460;
  transition: stroke-dashoffset 0.15s linear;
}
@media (max-width: 900px) { .arc-track { display: none; } }

/* ===== Scroll reveal — slow, deliberate ===== */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.9s cubic-bezier(0.22,1,0.36,1), transform 0.9s cubic-bezier(0.22,1,0.36,1); }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.problem-grid .reveal:nth-child(2) { transition-delay: 0.12s; }
.problem-grid .reveal:nth-child(3) { transition-delay: 0.24s; }
.demo-grid .reveal:nth-child(2) { transition-delay: 0.12s; }
.demo-grid .reveal:nth-child(3) { transition-delay: 0.24s; }
.packages-grid .reveal:nth-child(2) { transition-delay: 0.12s; }
.packages-grid .reveal:nth-child(3) { transition-delay: 0.24s; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(237,232,223,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); }
.brand svg { color: var(--ink); flex-shrink: 0; }
.brand-text { font-family: var(--display); font-weight: 500; font-size: 18px; letter-spacing: 0.01em; }
.site-nav { display: flex; align-items: center; gap: 30px; font-size: 13px; font-weight: 500; }
.site-nav a { color: var(--stone); transition: color 0.2s; letter-spacing: 0.02em; }
.site-nav a:hover { color: var(--ink); }
.nav-cta { border: 1px solid var(--ink); color: var(--ink) !important; padding: 9px 18px; border-radius: 2px; }
.nav-cta:hover { background: var(--ink); color: var(--paper) !important; }
@media (max-width: 700px) { .site-nav a:not(.nav-cta) { display: none; } }

/* ===== Buttons — monochrome, sharp corners ===== */
.btn { display: inline-block; padding: 14px 28px; border-radius: 2px; font-weight: 500; font-size: 14px; letter-spacing: 0.02em; transition: all 0.2s ease; }
.btn-primary { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.btn-primary:hover { background: transparent; color: var(--ink); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-outline { border: 1px solid var(--stone); color: var(--ink); width: 100%; text-align: center; }
.btn-outline:hover { border-color: var(--ink); }
.btn-full { width: 100%; text-align: center; cursor: pointer; }

/* ===== Hero ===== */
.hero { position: relative; padding: 140px 0 120px; overflow: hidden; background: var(--paper-2); }
.hero-map { position: absolute; top: 50%; right: -8%; transform: translateY(-50%); width: 600px; max-width: 58vw; opacity: 0; animation: mapIn 1.8s cubic-bezier(0.22,1,0.36,1) 0.2s forwards; pointer-events: none; }
@keyframes mapIn { from { opacity: 0; transform: translateY(-50%) scale(1.06); } to { opacity: 1; transform: translateY(-50%) scale(1); } }
.hero-map svg { width: 100%; height: auto; transition: transform 0.1s linear; }
.map-shape { fill: none; stroke: var(--ink); stroke-width: 1; stroke-opacity: 0.22; }
.map-shape-sm { stroke-width: 0.8; }
.map-route { fill: none; stroke: var(--accent); stroke-width: 1.3; stroke-linecap: round; stroke-dasharray: 260; stroke-dashoffset: 260; animation: drawRoute 2.4s cubic-bezier(0.22,1,0.36,1) 1.1s forwards; }
@keyframes drawRoute { to { stroke-dashoffset: 0; } }
.map-pin { fill: var(--accent); }
.map-label { font-family: var(--body); font-size: 9px; font-weight: 500; fill: var(--stone); letter-spacing: 0.05em; }

.hero-inner { max-width: 600px; }
.hero h1 { font-size: clamp(50px, 7.5vw, 88px); line-height: 1.02; margin-bottom: 26px; color: var(--ink); font-weight: 500; }
.hero-sub { font-size: 17px; color: var(--stone); margin-bottom: 36px; max-width: 500px; font-weight: 400; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-note { font-family: var(--display); font-style: italic; font-size: 15px; color: var(--stone); }
@media (max-width: 760px) { .hero-map { display: none; } }

/* ===== Problem ===== */
.problem { padding: 110px 0; background: var(--paper); }
.problem h2 { font-size: clamp(30px, 4vw, 42px); max-width: 680px; margin-bottom: 60px; color: var(--ink); }
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-bottom: 56px; }
.problem-num { font-family: var(--display); font-style: italic; font-size: 20px; font-weight: 500; color: var(--ink); margin-bottom: 8px; }
.problem-item p:last-child { color: var(--stone); font-size: 15px; }
.problem-close { font-family: var(--display); font-size: 22px; font-weight: 500; color: var(--ink); font-style: italic; }
@media (max-width: 760px) { .problem-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ===== Services ===== */
.services { padding: 110px 0; background: var(--paper-2); }
.services h2 { font-size: clamp(30px, 4vw, 42px); max-width: 620px; margin-bottom: 64px; color: var(--ink); }
.service-block { display: flex; gap: 34px; padding: 38px 0; border-top: 1px solid var(--line); }
.service-block:last-child { border-bottom: 1px solid var(--line); }
.service-num { font-family: var(--display); font-style: italic; font-size: 20px; font-weight: 500; color: var(--stone); flex-shrink: 0; width: 36px; }
.service-content h3 { font-size: 23px; margin-bottom: 10px; color: var(--ink); font-weight: 500; }
.service-content p { color: var(--stone); max-width: 540px; font-size: 15px; }
@media (max-width: 640px) { .service-block { flex-direction: column; gap: 10px; } }

/* ===== Demos ===== */
.demos { padding: 110px 0; background: var(--paper); }
.demos h2 { font-size: clamp(30px, 4vw, 42px); max-width: 620px; color: var(--ink); }
.section-sub { color: var(--stone); margin-top: 12px; margin-bottom: 56px; max-width: 480px; font-size: 15px; }
.demo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.demo-card { display: block; background: var(--paper); padding: 32px 28px; transition: background 0.25s ease; }
.demo-card:hover { background: var(--paper-2); }
.demo-tag { display: inline-block; font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stone); margin-bottom: 14px; }
.demo-card h3 { font-size: 19px; margin-bottom: 10px; color: var(--ink); font-weight: 500; }
.demo-card p { color: var(--stone); font-size: 14px; margin-bottom: 18px; }
.demo-link { font-size: 13px; font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
@media (max-width: 860px) { .demo-grid { grid-template-columns: 1fr; } }

/* ===== Packages ===== */
.packages { padding: 110px 0; background: var(--paper-2); }
.packages h2 { font-size: clamp(30px, 4vw, 42px); color: var(--ink); }
.packages-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 56px 0 32px; background: var(--line); border: 1px solid var(--line); }
.package-card { background: var(--paper); padding: 34px 28px; display: flex; flex-direction: column; }
.package-card-featured { background: var(--paper); }
.package-badge { font-family: var(--display); font-style: italic; font-size: 14px; color: var(--stone); margin-bottom: 14px; }
.package-card h3 { font-size: 21px; margin-bottom: 6px; color: var(--ink); font-weight: 500; }
.package-sub { font-size: 13px; color: var(--stone); margin-bottom: 24px; }
.package-card ul { margin-bottom: 28px; flex-grow: 1; }
.package-card li { font-size: 14px; padding: 9px 0; border-top: 1px solid var(--line); color: var(--stone); }
.package-card li:first-child { border-top: none; }
.packages-note { font-size: 13px; color: var(--stone); text-align: center; max-width: 460px; margin: 0 auto; }
@media (max-width: 860px) { .packages-grid { grid-template-columns: 1fr; } }

/* ===== Team ===== */
.team { padding: 110px 0; background: var(--paper); }
.team-inner { max-width: 600px; }
.team h2 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 24px; color: var(--ink); }
.team-copy { color: var(--stone); font-size: 16px; }

/* ===== Contact — the one dark moment ===== */
.contact { padding: 120px 0; background: var(--ink); color: var(--paper); }
.contact-inner { max-width: 540px; margin: 0 auto; text-align: center; }
.contact .eyebrow { color: rgba(237,232,223,0.55); }
.contact h2 { font-size: clamp(32px, 4.5vw, 46px); color: var(--paper); }
.contact .section-sub { color: rgba(237,232,223,0.6); margin-left: auto; margin-right: auto; }
.intake-form { text-align: left; margin-top: 40px; }
.form-row { margin-bottom: 18px; }
.form-row-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row label { display: block; font-size: 12px; font-weight: 500; color: rgba(237,232,223,0.55); margin-bottom: 8px; letter-spacing: 0.02em; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 12px 14px; background: var(--ink-2); border: 1px solid var(--line-dark);
  border-radius: 2px; color: var(--paper); font-family: inherit; font-size: 15px;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: none; border-color: var(--accent-bright); }
.contact .btn-primary { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.contact .btn-primary:hover { background: transparent; color: var(--paper); }
@media (max-width: 560px) { .form-row-split { grid-template-columns: 1fr; } }

/* ===== Footer ===== */
.site-footer { padding: 48px 0; background: var(--ink); border-top: 1px solid var(--line-dark); color: var(--paper); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.footer-inner .brand { color: var(--paper); }
.footer-contact { color: rgba(237,232,223,0.7); font-size: 13px; }
.footer-copy { color: rgba(237,232,223,0.4); font-size: 12px; }

/* ===== Grain texture — barely-there tactility ===== */
body::after {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 4;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.03;
  mix-blend-mode: multiply;
}

/* ===== Hero — choreographed entrance ===== */
.hero-inner .eyebrow { opacity: 0; animation: heroFade 0.8s ease 0.1s forwards; }
.hero h1 { overflow: hidden; }
.hero h1 .mask-line { display: block; overflow: hidden; }
.hero h1 .mask-inner { display: block; transform: translateY(115%); animation: maskUp 1s cubic-bezier(0.22,1,0.36,1) 0.35s forwards; }
@keyframes maskUp { to { transform: translateY(0); } }
@keyframes heroFade { to { opacity: 1; } }
@keyframes heroFadeUp { to { opacity: 1; transform: translateY(0); } }
.hero-sub { opacity: 0; transform: translateY(10px); animation: heroFadeUp 0.9s cubic-bezier(0.22,1,0.36,1) 0.75s forwards; }
.hero-actions { opacity: 0; transform: translateY(10px); animation: heroFadeUp 0.9s cubic-bezier(0.22,1,0.36,1) 0.95s forwards; }
.hero-note { opacity: 0; animation: heroFade 0.8s ease 1.15s forwards; }

/* ===== Arc Assistant — chat widget ===== */
.chat-widget { position: fixed; right: 24px; bottom: 24px; z-index: 40; }
.chat-toggle {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(28,27,25,0.25);
  transition: transform 0.2s ease;
}
.chat-toggle:hover { transform: scale(1.05); }
.chat-panel {
  position: absolute; bottom: 66px; right: 0;
  width: 320px; max-width: calc(100vw - 48px);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 4px; box-shadow: 0 12px 40px rgba(28,27,25,0.18);
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--ink); color: var(--paper);
  font-family: var(--display); font-style: italic; font-size: 15px;
}
.chat-close { background: none; border: none; color: var(--paper); font-size: 18px; cursor: pointer; line-height: 1; }
.chat-messages { padding: 14px 16px; max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { font-size: 13px; line-height: 1.55; max-width: 88%; padding: 9px 12px; border-radius: 4px; }
.chat-msg-bot { background: var(--paper-2); color: var(--ink); align-self: flex-start; }
.chat-msg-user { background: var(--ink); color: var(--paper); align-self: flex-end; }
.chat-msg-loading { opacity: 0.5; font-style: italic; }
.chat-input-row { display: flex; border-top: 1px solid var(--line); }
.chat-input-row input {
  flex: 1; border: none; padding: 12px 14px; font-family: inherit; font-size: 13px;
  background: var(--paper); color: var(--ink);
}
.chat-input-row input:focus { outline: none; }
.chat-input-row button {
  border: none; background: var(--ink); color: var(--paper);
  width: 44px; cursor: pointer; font-size: 15px;
}
@media (max-width: 480px) { .chat-panel { width: calc(100vw - 48px); } }

/* ===== Demo pages — shared components ===== */
.demo-badge {
  display: inline-block; font-size: 11px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--stone); border: 1px solid var(--line);
  padding: 5px 12px; border-radius: 20px; margin-bottom: 20px;
}
.demo-note { font-size: 13px; color: var(--stone); font-style: italic; font-family: var(--display); margin-top: 8px; }
.browser-mock { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--paper); }
.browser-mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.browser-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.browser-mock-body { padding: 30px 24px; }
.browser-mock-body h4 { font-size: 22px; margin-bottom: 8px; }
.browser-mock-body p { color: var(--stone); font-size: 14px; }

.chat-transcript { border: 1px solid var(--line); border-radius: 6px; padding: 20px; background: var(--paper-2); display: flex; flex-direction: column; gap: 12px; }
.transcript-msg { font-size: 14px; padding: 10px 14px; border-radius: 6px; max-width: 78%; }
.transcript-msg-visitor { background: var(--ink); color: var(--paper); align-self: flex-end; }
.transcript-msg-bot { background: var(--paper); border: 1px solid var(--line); align-self: flex-start; }

.sequence-steps { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.sequence-step { background: var(--paper); padding: 20px 22px; display: flex; gap: 18px; align-items: flex-start; }
.sequence-time { font-family: var(--display); font-style: italic; font-size: 15px; color: var(--stone); flex-shrink: 0; width: 90px; }
.sequence-content h4 { font-size: 16px; margin-bottom: 4px; font-weight: 500; }
.sequence-content p { font-size: 13px; color: var(--stone); }

.demo-form { display: flex; flex-direction: column; gap: 12px; max-width: 360px; }
.demo-form input, .demo-form select { padding: 11px 13px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); font-family: inherit; font-size: 14px; color: var(--ink); }
.demo-confirm { border: 1px solid var(--accent); border-radius: 4px; padding: 18px 20px; background: rgba(36,56,45,0.06); max-width: 360px; }
.demo-confirm p:first-child { font-family: var(--display); font-style: italic; font-size: 17px; margin-bottom: 4px; }
.demo-confirm p:last-child { font-size: 13px; color: var(--stone); }

.review-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.review-card { border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px; }
.review-label { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stone); margin-bottom: 10px; }
.review-card p { font-size: 14px; }
@media (max-width: 700px) { .review-pair { grid-template-columns: 1fr; } }

.demo-section { padding: 70px 0; }
.demo-section:nth-child(even) { background: var(--paper-2); }
.demo-section h2 { font-size: clamp(26px, 3.5vw, 34px); margin-bottom: 14px; }
.demo-section .section-sub { margin-bottom: 40px; }
