/* ==========================================================================
   Seventh Systems — seventhsystems.com
   ========================================================================== */

/* Self-hosted variable fonts (SIL Open Font License), latin subset */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("fonts/fraunces-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 500 600;
  font-display: swap;
  src: url("fonts/fraunces-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/inter.woff2") format("woff2");
}

:root {
  --bg: #faf8f3;
  --bg-alt: #f3efe6;
  --ink: #1a1712;
  --muted: #6b6459;
  --line: rgba(26, 23, 18, 0.14);
  --accent: #a54d1b;
  --accent-soft: rgba(165, 77, 27, 0.10);

  /* Oohmf case-study palette (from the product itself) */
  --oohmf-cream: #f7f4eb;
  --oohmf-card: #fdfcf8;
  --oohmf-sage: #659478;
  --oohmf-sage-text: #47705a; /* AA-contrast text on the cream card; sage stays for decoration */
  --oohmf-sage-soft: #d1e0d7;
  --oohmf-tan: #b08968;
  --oohmf-tan-soft: #e3d0bd;
  --oohmf-ember: #d08c60;
  --oohmf-ink: #2c3a31;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --container: 1120px;
  --radius: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141210;
    --bg-alt: #1b1815;
    --ink: #f0ece3;
    --muted: #a59d8f;
    --line: rgba(240, 236, 227, 0.16);
    --accent: #e07845;
    --accent-soft: rgba(224, 120, 69, 0.14);
  }
}

/* ---------- Base ---------- */

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

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

a { color: inherit; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 1rem;
  border-radius: 0 0 10px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--accent); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn-ghost:hover { background: var(--accent-soft); color: var(--ink); }

.btn-small { padding: 0.55rem 1.1rem; font-size: 0.875rem; }

.btn-light { background: var(--bg); color: var(--ink); }
.btn-light:hover { background: var(--accent); color: #fff; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
/* color-mix() with var() nullifies to transparent in old browsers (IACVT),
   so a plain preceding fallback declaration would never win — guard instead */
@supports not (background: color-mix(in srgb, red 50%, transparent)) {
  .site-header { background: var(--bg); }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-name { font-size: 1.05rem; white-space: nowrap; }

.brand-mark { width: 30px; height: 30px; flex: none; }
.mark-bg { fill: var(--ink); }
.mark-stroke { stroke: var(--bg); }
.brand:hover .mark-bg { fill: var(--accent); }
.brand:hover .mark-stroke { stroke: #fff; }

/* ---------- Nav ---------- */

.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  list-style: none;
}
.nav-menu a:not(.btn) {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s ease;
}
.nav-menu a:not(.btn):hover { color: var(--ink); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle-bar {
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
}
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.nav-toggle-bar::before { top: -5px; }
.nav-toggle-bar::after { top: 5px; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1.25rem;
  }
  .site-nav[data-open="true"] .nav-menu { display: flex; }
  .nav-menu li { border-top: 1px solid var(--line); }
  .nav-menu li:first-child { border-top: none; }
  .nav-menu a:not(.btn) { display: block; padding: 0.9rem 0.25rem; font-size: 1.05rem; }
  .nav-cta { border-top: none !important; padding-top: 0.75rem; }
  .nav-cta .btn { display: block; text-align: center; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 2rem;
  padding-block: clamp(4rem, 10vw, 7.5rem);
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  margin-bottom: 1.4rem;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--muted);
  max-width: 34em;
  text-wrap: pretty;
}

.hero .lead { margin-bottom: 2.2rem; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2.4rem;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.hero-note a { color: var(--ink); font-weight: 600; }

.pulse-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--oohmf-sage);
  box-shadow: 0 0 0 0 rgba(101, 148, 120, 0.5);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(101, 148, 120, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(101, 148, 120, 0); }
  100% { box-shadow: 0 0 0 0 rgba(101, 148, 120, 0); }
}

.hero-figure {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.giant-seven {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(12rem, 26vw, 24rem);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 2px var(--line);
  user-select: none;
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-figure {
    position: absolute;
    right: -4rem;
    bottom: -3rem;
    z-index: -1;
    opacity: 0.6;
  }
  .hero-copy { position: relative; z-index: 1; }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(4rem, 9vw, 6.5rem); }

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

.section-head { margin-bottom: clamp(2.25rem, 5vw, 3.5rem); }
.section-head h2 {
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  max-width: 18em;
}

/* ---------- Case card (Oohmf) ---------- */

.case-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  background: var(--oohmf-cream);
  color: var(--oohmf-ink);
  border: 1px solid rgba(44, 58, 49, 0.1);
  border-radius: calc(var(--radius) * 1.4);
  padding: clamp(1.75rem, 4.5vw, 3.5rem);
}

.case-tag {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--oohmf-sage-text);
  margin-bottom: 1rem;
}

.case-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.55;
  margin-bottom: 1.5rem;
  text-wrap: pretty;
}

.case-features {
  list-style: none;
  margin-bottom: 1.5rem;
}
.case-features li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.55rem;
  font-size: 0.975rem;
}
.case-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 0.85em;
  height: 0.85em;
  border-radius: 50%;
  background: var(--oohmf-sage-soft);
  box-shadow: inset 0 0 0 2.5px var(--oohmf-sage);
}

.case-stack {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(44, 58, 49, 0.72);
}

/* Phone mockup */

.case-visual { display: flex; justify-content: center; }

.phone {
  width: min(300px, 100%);
  border-radius: 42px;
  background: var(--oohmf-ink);
  padding: 12px;
  box-shadow: 0 24px 60px -24px rgba(44, 58, 49, 0.45);
}

.phone-screen {
  border-radius: 32px;
  background: var(--oohmf-cream);
  padding: 1.4rem 1.1rem 1.2rem;
  font-size: 0.8rem;
  line-height: 1.4;
}

.ph-date {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--oohmf-sage);
}
.ph-greeting {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 0.9rem;
}

.ph-card {
  background: var(--oohmf-card);
  border: 1px solid rgba(44, 58, 49, 0.08);
  border-radius: 18px;
  padding: 0.9rem;
  margin-bottom: 0.7rem;
}

.ph-challenge-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}
.ph-chip {
  background: var(--oohmf-sage-soft);
  color: var(--oohmf-ink);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}
.ph-risk { font-size: 0.68rem; color: var(--oohmf-tan); }
.ph-risk strong { color: var(--oohmf-ember); font-size: 0.8rem; }

.ph-challenge-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  margin-bottom: 0.6rem;
}

.ph-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.ph-pills {
  display: flex;
  gap: 4px;
  margin-bottom: 0.55rem;
}
.ph-pills i {
  flex: 1;
  height: 9px;
  border-radius: 999px;
  background: #e6e3d8;
}
.ph-pills i.on { background: var(--oohmf-sage); }
.ph-pills.alt i.on { background: var(--oohmf-tan); }

.ph-action {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.ph-avatar {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  background: var(--oohmf-tan-soft);
  box-shadow: inset 0 0 0 2px var(--oohmf-tan);
}
.ph-action-text { flex: 1; font-size: 0.72rem; color: rgba(44, 58, 49, 0.7); }
.ph-action-text strong { color: var(--oohmf-ink); font-size: 0.78rem; }
.ph-verify {
  background: var(--oohmf-sage);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
}

.ph-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}
.ph-stat {
  background: var(--oohmf-card);
  border: 1px solid rgba(44, 58, 49, 0.08);
  border-radius: 16px;
  padding: 0.65rem 0.8rem;
}
.ph-stat span {
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--oohmf-sage);
}
.ph-stat strong { font-size: 1.05rem; }

@media (max-width: 860px) {
  .case-card { grid-template-columns: 1fr; }
  .case-visual { order: -1; }
  .phone { width: min(260px, 80%); }
}

/* ---------- Services ---------- */

.services {
  list-style: none;
  counter-reset: none;
}

.service {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 1.5rem;
  padding-block: clamp(1.75rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line);
}
.service:last-child { border-bottom: 1px solid var(--line); }

.service-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--accent);
  line-height: 1.3;
}

.service h3 {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  margin-bottom: 0.5rem;
}
.service p {
  color: var(--muted);
  max-width: 46em;
  text-wrap: pretty;
}

@media (max-width: 600px) {
  .service { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* ---------- Approach ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}

.principle {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--bg);
}
.principle h3 {
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
}
.principle p {
  color: var(--muted);
  font-size: 0.975rem;
  text-wrap: pretty;
}

@media (max-width: 820px) {
  .principles { grid-template-columns: 1fr; }
}

/* ---------- Contact ---------- */

.contact {
  background: var(--ink);
  color: var(--bg);
}

.contact-inner {
  text-align: center;
  max-width: 46rem;
}

.contact .eyebrow { color: var(--oohmf-ember); }

.contact h2 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: 1rem;
}

.contact .lead {
  color: color-mix(in srgb, var(--bg) 70%, transparent);
  margin-inline: auto;
  margin-bottom: 2.2rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-meta {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------- Reveal animation ----------
   The hidden state is scoped under .has-reveal, which script.js adds to <html>
   only when it runs — so content is never hidden if JS fails to load.
   Screen-only: in print the observer never fires, so below-fold sections
   would otherwise print blank. */

@media screen and (prefers-reduced-motion: no-preference) {
  .has-reveal .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .has-reveal .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-dot { animation: none; }
}

/* ---------- Dark-mode overrides that must follow the base rules ---------- */

@media (prefers-color-scheme: dark) {
  /* The contact band inverts to cream in dark mode; ember and white-on-accent
     both fail contrast there */
  .contact .eyebrow { color: #a04a17; }
  .btn:hover, .btn-light:hover { color: #141210; }
}

/* ---------- Print ---------- */

@media print {
  .site-header { position: static; background: none; }
  .contact, .contact .lead, .btn { color: #000; background: none; }
  .btn { box-shadow: inset 0 0 0 1.5px #000; }
}
