/* Everwright Creative — site styles
   One small stylesheet, no framework. Brand values live in :root. */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Metric-matched fallback so text doesn't shift when Inter loads (CLS). */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0%;
  size-adjust: 107.12%;
}

:root {
  --ink: #0b1220;
  --text: #1f2633;
  --muted: #5b6475;
  --line: #e6e8ec;
  --surface: #f6f7f9;
  --bg: #ffffff;
  --accent: #2f5bff;
  --accent-ink: #1e43d6;
  --accent-soft: #eef2ff;

  --font: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(64px, 10vw, 120px);

  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 0.5em;
  font-weight: 650;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); letter-spacing: -0.04em; font-weight: 680; }
h2 { font-size: clamp(1.875rem, 3.6vw, 2.75rem); letter-spacing: -0.035em; }
h3 { font-size: 1.25rem; letter-spacing: -0.015em; }

p { margin: 0 0 1.1em; text-wrap: pretty; }

a { color: var(--accent-ink); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

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

::selection { background: var(--accent-soft); color: var(--ink); }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus { top: 16px; color: #fff; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
@supports (animation-timeline: scroll()) {
  .site-header {
    animation: header-line linear both;
    animation-timeline: scroll();
    animation-range: 0 64px;
  }
  @keyframes header-line { to { border-bottom-color: var(--line); } }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand { display: inline-flex; flex-shrink: 0; }
.brand img { width: 221px; height: 32px; }

.nav ul {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, background-color 0.15s;
}
.nav .short { display: none; }
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--ink); }

.nav .nav-cta {
  margin-left: 8px;
  background: var(--ink);
  color: #fff;
}
.nav .nav-cta[aria-current="page"] { color: #fff; }
.nav .nav-cta:hover { background: var(--accent); color: #fff; }

@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; gap: 0; padding-top: 12px; }
  .brand img { width: 193px; height: 28px; }
  .nav { width: 100%; overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 8px; }
  .nav ul { gap: 0; }
  .nav a { padding: 0 12px; }
  .nav li:first-child a { padding-left: 0; }
  .nav .nav-cta { margin-left: auto; padding: 0 14px; }
  .nav li:last-child { margin-left: auto; }
  .nav .long { display: none; }
  .nav .short { display: inline; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.9875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); color: #fff; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--accent-soft); color: var(--ink); }
.btn .arrow { transition: transform 0.15s; }
.btn:hover .arrow { transform: translateX(3px); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

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

.section { padding: var(--section) 0; }
.section + .section { padding-top: 0; }
.section-alt { background: var(--surface); }
.section-alt + .section { padding-top: var(--section); }
.section + .section-alt { padding-top: var(--section); }

.eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--accent-ink);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  max-width: 40rem;
  color: var(--muted);
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.6;
}

.section-head { max-width: 46rem; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head p { color: var(--muted); font-size: 1.125rem; }

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

.hero { padding: clamp(56px, 9vw, 112px) 0 clamp(64px, 10vw, 120px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}

.hero h1 { margin-bottom: 24px; }
.hero h1 .accent { color: var(--accent); }
.hero .lead { margin-bottom: 36px; }
.hero + .section { padding-top: clamp(16px, 3vw, 40px); }

.hero-art { width: 100%; max-width: 440px; justify-self: end; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { display: none; }
}

.page-hero { padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 6vw, 64px); }
.page-hero h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); max-width: 18ch; }

/* ---------- Cards / grids ---------- */

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.card p { color: var(--muted); font-size: 1rem; }
.card p:last-child { margin-bottom: 0; }
.card h3 { margin-bottom: 10px; }

a.card { color: inherit; text-decoration: none; }
a.card:hover {
  border-color: #cfd4dc;
  box-shadow: 0 1px 2px rgb(11 18 32 / 0.04), 0 8px 24px rgb(11 18 32 / 0.06);
  transform: translateY(-2px);
}
.card .more {
  margin-top: auto;
  padding-top: 16px;
  color: var(--accent-ink);
  font-size: 0.9375rem;
  font-weight: 600;
}

.icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 10px;
}
.icon svg { width: 22px; height: 22px; }

/* Numbered steps */
.steps { counter-reset: step; }
.step { padding-top: 24px; border-top: 1px solid var(--line); }
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  margin-bottom: 16px;
  color: var(--accent-ink);
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.step p { color: var(--muted); font-size: 1rem; margin: 0; }

/* Two-column split */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.prose { max-width: 40rem; }
.prose p { color: var(--text); }

/* Check list */
.checks { list-style: none; margin: 0 0 1.25em; padding: 0; }
.checks li {
  position: relative;
  padding: 10px 0 10px 32px;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
}
.checks li:last-child { border-bottom: 0; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5.5 9.2l2.3 2.3 4.7-5' fill='none' stroke='%232f5bff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}

/* Service detail blocks */
.service {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 5vw, 80px);
  padding: clamp(48px, 7vw, 80px) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 96px;
}
.service:first-of-type { border-top: 0; padding-top: 0; }
.service:last-of-type { padding-bottom: 0; }
.service h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
.service .lead { font-size: 1.125rem; }
.service h3 { font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
@media (max-width: 860px) { .service { grid-template-columns: 1fr; } }

/* Engagement cards (work page) */
.engagement { padding: 32px; }
.engagement .tag {
  align-self: flex-start;
  margin-bottom: 20px;
  padding: 4px 10px;
  background: var(--surface);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
}
.engagement dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin: 8px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}
.engagement dt { color: var(--muted); }
.engagement dd { margin: 0; color: var(--ink); }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.0625rem;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  background: linear-gradient(var(--ink), var(--ink)) center / 12px 1.5px no-repeat,
              linear-gradient(var(--ink), var(--ink)) center / 1.5px 12px no-repeat;
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); max-width: 44rem; padding-bottom: 8px; }

/* CTA band */
.cta {
  padding: clamp(48px, 7vw, 80px);
  background: var(--ink);
  border-radius: calc(var(--radius) * 1.5);
  color: #c9cfdb;
}
.cta h2 { color: #fff; max-width: 20ch; }
.cta p { max-width: 36rem; font-size: 1.125rem; margin-bottom: 32px; }

/* ---------- Forms ---------- */

.form { display: grid; gap: 20px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .form .row { grid-template-columns: 1fr; } }

.field { display: grid; gap: 8px; }
.field label,
.field legend { color: var(--ink); font-size: 0.9375rem; font-weight: 600; padding: 0; }
.field .hint { color: var(--muted); font-weight: 400; }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid #d5d9e0;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(47 91 255 / 0.18);
}

fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #d5d9e0;
  border-radius: 999px;
  color: var(--text);
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.15s;
}
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.hp { position: absolute; left: -9999px; }

.form-note { color: var(--muted); font-size: 0.875rem; margin: 0; }

.contact-aside { padding: 32px; background: var(--surface); border-radius: var(--radius); }
.contact-aside h2 { font-size: 1.25rem; letter-spacing: -0.015em; }
.contact-aside p { color: var(--muted); font-size: 1rem; }
.contact-aside .big-link { font-size: 1.125rem; font-weight: 600; color: var(--ink); text-decoration: none; word-break: break-word; }
.contact-aside .big-link:hover { color: var(--accent-ink); }
.contact-aside hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

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

.site-footer {
  padding: 56px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, 1fr);
  gap: 40px;
}
.footer-grid p { max-width: 22rem; }
.footer-grid h2 {
  color: var(--ink);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--muted);
  text-decoration: none;
}
.footer-grid li a:hover { color: var(--ink); }
.footer-brand img { width: 193px; height: 28px; margin-bottom: 16px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
}
.footer-bottom a { color: var(--muted); }
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

/* ---------- Misc ---------- */

.center { text-align: center; }
.not-found { min-height: 50vh; display: grid; align-content: center; justify-items: start; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header, .site-footer, .cta, .skip-link { display: none; }
  body { font-size: 12pt; }
}
