/* ==========================================================
   Operynx — design tokens
   ========================================================== */
:root {
  --bg: #faf9f5;
  --ink: #14140f;
  --muted: #6b6a62;
  --pine: #1c3b33;
  --pine-light: #2a5147;
  --bronze: #b08d57;
  --line: rgba(20, 20, 15, 0.1);

  --font: "General Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1140px;
  --wrap-narrow: 720px;

  --space-section: clamp(96px, 15vw, 200px);
  --radius: 4px;

  --header-h: 76px;
}

@media (max-width: 640px) {
  :root { --header-h: 64px; }
}

/* ==========================================================
   Reset
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 32px;
}
.wrap-narrow {
  max-width: var(--wrap-narrow);
  margin: 0 auto;
  padding: 0 32px;
}

/* ==========================================================
   Type scale
   ========================================================== */
.eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pine);
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(38px, 5.4vw, 84px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 18ch;
}

h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.section-lead {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--muted);
  max-width: 56ch;
  margin-top: 24px;
  line-height: 1.6;
}

/* ==========================================================
   Buttons
   ========================================================== */
.btn {
  display: inline-block;
  font-family: var(--font);
  font-weight: 600;
  font-size: 16px;
  padding: 16px 30px;
  border-radius: var(--radius);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary {
  background: var(--pine);
  color: var(--bg);
}
.btn-primary:hover { background: var(--bronze); }
.btn-secondary {
  background: transparent;
  color: var(--pine);
  border: 1px solid var(--line);
}
.btn-secondary:hover { border-color: var(--pine); }
.btn-small { padding: 11px 20px; font-size: 14px; }

/* ==========================================================
   Header
   ========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(250, 249, 245, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.wordmark {
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}

/* keep sticky header from covering anchor-scrolled section tops */
#top,
.section,
.hero {
  scroll-margin-top: var(--header-h);
}

/* ==========================================================
   Hero
   ========================================================== */
.hero {
  padding: clamp(64px, 10vw, 120px) 0 96px;
  background:
    radial-gradient(ellipse 900px 560px at 80% -14%, rgba(28, 59, 51, 0.08), transparent 60%),
    radial-gradient(ellipse 700px 420px at -10% 40%, rgba(176, 141, 87, 0.05), transparent 55%),
    var(--bg);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 40px;
  align-items: center;
}
.hero-text { max-width: 780px; }
.hero-sub {
  font-size: clamp(17px, 1.8vw, 21px);
  color: var(--muted);
  max-width: 48ch;
  margin: 28px 0 40px;
  line-height: 1.6;
}

/* hero visual: staged stack of notification cards, missed call -> text -> booked */
.hero-visual {
  display: flex;
  justify-content: center;
}
.notif-stack {
  position: relative;
  width: min(320px, 100%);
  height: 210px;
}
.notif-card {
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  background: #fff;
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow:
    0 40px 70px -28px rgba(20, 20, 15, 0.32),
    0 10px 24px -10px rgba(20, 20, 15, 0.18);
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.5s ease;
}
.notif-card:nth-child(1) { z-index: 3; transform: translateY(0) scale(1) rotate(-1.5deg); opacity: 1; }
.notif-card:nth-child(2) { z-index: 2; transform: translateY(46px) scale(0.85); opacity: 0; }
.notif-card:nth-child(3) { z-index: 1; transform: translateY(46px) scale(0.85); opacity: 0; }

.notif-card.is-front { z-index: 3; transform: translateY(0) scale(1) rotate(-1.5deg); opacity: 1; }
.notif-card.is-back-1 { z-index: 2; transform: translateY(16px) scale(0.95) rotate(-3deg); opacity: 0.7; }
.notif-card.is-back-2 { z-index: 1; transform: translateY(30px) scale(0.9) rotate(-4.5deg); opacity: 0.4; }
.notif-card.is-queued { z-index: 0; transform: translateY(46px) scale(0.85); opacity: 0; }

.notif-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}
.notif-app-icon {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--pine);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex: none;
}
.notif-app-name { font-weight: 600; color: var(--ink); }
.notif-body {
  display: flex;
  align-items: center;
  gap: 14px;
}
.notif-status-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--pine);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.notif-status-icon--success { background: var(--bronze); }
.notif-title {
  font-weight: 600;
  font-size: 16px;
}
.notif-sub {
  font-size: 14px;
  color: var(--muted);
  margin-top: 2px;
}

/* ==========================================================
   Sections
   ========================================================== */
.section {
  padding: var(--space-section) 0;
}
.section-alt {
  background: #f2f0e9;
}
.section-dark {
  background: var(--pine);
  color: var(--bg);
}
.section-dark .eyebrow { color: var(--bronze); }
.section-dark .step p { color: rgba(250, 249, 245, 0.72); }
.section h2 { margin-bottom: 0; }

/* formula / cost calculator */
.formula {
  margin: 48px 0;
  padding: 40px clamp(20px, 4vw, 48px);
  background: var(--pine);
  color: var(--bg);
  border-radius: var(--radius);
}
.formula-label {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.75;
  text-transform: uppercase;
}
.formula-result-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 12px;
}
.formula-arrow {
  font-size: clamp(22px, 3vw, 32px);
  color: var(--bronze);
}
.formula-result {
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 700;
  color: var(--bronze);
  letter-spacing: -0.01em;
}
.formula-result-unit {
  font-size: clamp(16px, 2vw, 20px);
  opacity: 0.7;
}
.formula-caption {
  margin-top: 18px;
  font-size: 14px;
  opacity: 0.65;
}

/* mini calculator */
.formula-calc {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid rgba(250, 249, 245, 0.18);
}
.calc-row {
  margin-bottom: 22px;
}
.calc-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  font-size: 14px;
}
.calc-row-head label { opacity: 0.75; }
.calc-value {
  font-weight: 600;
  color: var(--bronze);
}
.formula-calc input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(250, 249, 245, 0.22);
  outline: none;
}
.formula-calc input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bronze);
  cursor: pointer;
  border: 3px solid var(--pine);
  box-shadow: 0 0 0 1px rgba(250, 249, 245, 0.4);
}
.formula-calc input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bronze);
  cursor: pointer;
  border: 3px solid var(--pine);
  box-shadow: 0 0 0 1px rgba(250, 249, 245, 0.4);
}
.calc-formula {
  font-size: 15px;
  opacity: 0.8;
  margin-top: 4px;
}

/* steps */
.steps {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.step-num {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--bronze);
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}
.step h3 { margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 15px; line-height: 1.6; }

/* services */
.services-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.service-card {
  background: var(--bg);
  padding: 36px 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.service-card:hover {
  transform: translateY(-2px);
  border-color: rgba(28, 59, 51, 0.28);
  box-shadow: 0 16px 32px -20px rgba(20, 20, 15, 0.28);
}
.service-card h3 { margin-bottom: 10px; }
.service-card p { color: var(--muted); font-size: 15px; line-height: 1.6; }

/* founder note */
.founder-note {
  font-size: clamp(21px, 2.6vw, 28px);
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-left: 2px solid var(--bronze);
  padding-left: 28px;
}

/* case study placeholder */
.case-placeholder {
  padding: 56px clamp(24px, 5vw, 56px);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: left;
}
.case-placeholder h2 { margin-bottom: 16px; }
.case-placeholder p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
  max-width: 48ch;
  margin-bottom: 32px;
}

/* contact */
.section-contact .btn-primary { margin-top: 40px; }
.contact-alt {
  margin-top: 20px;
  font-size: 15px;
  color: var(--muted);
}
.contact-alt a { color: var(--pine); }

/* animated amber underline for inline text links */
.contact-alt a,
.footer-inner a {
  position: relative;
  text-decoration: none;
  padding-bottom: 1px;
}
.contact-alt a::after,
.footer-inner a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--bronze);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.contact-alt a:hover::after,
.footer-inner a:hover::after {
  transform: scaleX(1);
}

/* footer */
.site-footer {
  background: var(--pine);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
  color: rgba(250, 249, 245, 0.62);
}
.footer-inner a { color: var(--bg); }
.footer-inner a:hover { color: var(--bronze); }

/* ==========================================================
   Scroll reveal
   ========================================================== */
[data-reveal] {
  opacity: 1;
  transform: none;
}
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 40px; }
  .services-grid { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { justify-content: flex-start; margin-top: 40px; }
}

@media (max-width: 640px) {
  .wrap, .wrap-narrow { padding: 0 20px; }
  .hero { padding: 48px 0 64px; }
  .founder-note { font-size: 20px; padding-left: 20px; }
}

/* ==========================================================
   Reduced motion
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .notif-card { transition: none; }
}
