/* Oh! Services. Colours come from /brand/tokens.css (ohretail/assets). */

@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --logo-ink: #1A1530;
  --wrap: 1120px;
  --gutter: 16px;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(26 21 48 / 0.06), 0 8px 24px -12px rgb(26 21 48 / 0.18);
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --logo-ink: #FFF8F0;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px -12px rgb(0 0 0 / 0.6);
  }
}

[data-theme="dark"] { --logo-ink: #FFF8F0; }

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font);
  font-feature-settings: "kern", "calt";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  margin: 0;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

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

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
  transition: color 0.15s, text-decoration-color 0.15s;
}

a:hover { color: var(--link-hover); text-decoration-color: currentColor; }

:focus-visible {
  outline: 3px solid var(--field-focus-border);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  text-decoration: none;
}

.skip:focus { top: 12px; }

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

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.top.is-stuck { border-bottom-color: var(--border); }

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.mark {
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.mark:hover { color: var(--text); }
.bang { color: var(--oh-orange-500); }

.top nav { display: flex; gap: 4px; }

.top nav a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.top nav a:hover { color: var(--text); background: var(--sunken); }

@media (max-width: 559px) {
  .top nav a:not([href="#contact"]) { display: none; }
}

/* ---------- Buttons (primary = orange with ink text; default = cream on white) */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--button-border);
  border-radius: 999px;
  background: var(--button);
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, transform 0.15s;
}

.button:hover { background: var(--button-hover); color: var(--text); }
.button:active { transform: translateY(1px); }

.button--primary {
  border-color: transparent;
  background: var(--primary);
  color: var(--on-primary);
}

.button--primary:hover { background: var(--primary-hover); color: var(--on-primary); }

.button span { transition: transform 0.15s; }
.button:hover span { transform: translateX(3px); }

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

.hero { padding: 56px 0 72px; }

@media (min-width: 720px) {
  .hero { padding: 96px 0 120px; }
}

.hero-face {
  display: block;
  width: min(100%, 600px);
  margin: 0 0 40px -6px;
  padding: 6px;
  border: 0;
  border-radius: 16px;
  background: none;
  color: var(--logo-ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hero-logo { display: block; width: 100%; height: auto; overflow: visible; }

.hero h1 {
  max-width: 15ch;
  font-size: clamp(2.5rem, 7.2vw, 5rem);
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.lede {
  max-width: 40em;
  margin-top: 24px;
  color: var(--muted);
  font-size: clamp(1.125rem, 2vw, 1.3125rem);
  line-height: 1.55;
}

.lede a { color: var(--text); font-weight: 700; }
.lede a:hover { color: var(--link-hover); }

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

/* Hero animation: surprise (eyes pop, brows up, "!" hops) -> delight (^^), then rest.
   Based on logos/animated/1-surprise-to-delight.svg in ohretail/assets. */

.hero-logo .eye, .hero-logo .brows, .hero-logo .happy, .hero-logo .mouth, .hero-logo .bang {
  transform-box: fill-box;
  transform-origin: center;
}

.hero-logo .bang { transform-origin: 50% 100%; }
.hero-logo .brows { opacity: 0; }
.hero-logo .happy { opacity: 0; }
.hero-logo .eye { transform: scale(0); }

.hero-face.play .eye   { animation: oh-eye 2.4s cubic-bezier(.3,.7,.3,1) both; }
.hero-face.play .brows { animation: oh-brows 2.4s cubic-bezier(.3,.7,.3,1) both; }
.hero-face.play .happy { animation: oh-happy 2.4s cubic-bezier(.3,.7,.3,1) both; }
.hero-face.play .mouth { animation: oh-mouth 2.4s cubic-bezier(.3,.7,.3,1) both; }
.hero-face.play .bang  { animation: oh-bang 2.4s cubic-bezier(.3,.7,.3,1) both; }

/* Without the play class (JS off, or before it starts) show the resting Happy face. */
.hero-face:not(.play) .happy { opacity: 1; }

@keyframes oh-eye {
  0%, 14% { transform: scale(1); }
  22% { transform: scale(1.4); }
  30%, 58% { transform: scale(1.15); }
  66%, 100% { transform: scale(0); }
}

@keyframes oh-brows {
  0%, 14% { opacity: 0; transform: translateY(6px); }
  22% { opacity: 1; transform: translateY(-3px); }
  30%, 58% { opacity: 1; transform: translateY(0); }
  66%, 100% { opacity: 0; transform: translateY(5px); }
}

@keyframes oh-happy {
  0%, 60% { opacity: 0; transform: scaleY(0); }
  68% { opacity: 1; transform: scaleY(1.25); }
  74%, 100% { opacity: 1; transform: scaleY(1); }
}

@keyframes oh-mouth {
  0%, 14% { transform: scale(1); }
  22% { transform: scale(1.14); }
  30%, 58% { transform: scale(1.07); }
  68% { transform: scale(0.95); }
  76%, 100% { transform: scale(1); }
}

@keyframes oh-bang {
  0%, 14% { transform: translateY(0) scaleY(1); }
  20% { transform: translateY(-12px) scaleY(1.05); }
  26% { transform: translateY(0) scaleY(0.9); }
  31%, 100% { transform: translateY(0) scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-face.play * { animation: none !important; }
  .hero-face .happy { opacity: 1 !important; }
  .hero-face .eye { transform: scale(0) !important; }
}

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

.band { padding: 72px 0; }

@media (min-width: 720px) {
  .band { padding: 112px 0; }
}

.band--sunken { background: var(--sunken); }

.eyebrow {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h2 { font-size: clamp(2rem, 4.4vw, 3rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.015em; }

.section-head { max-width: 40em; margin-bottom: 48px; }
.section-head p:not(.eyebrow) { margin-top: 16px; color: var(--muted); font-size: 1.125rem; }

/* Products */

.products {
  display: grid;
  gap: 24px;
}

@media (min-width: 960px) {
  .products { grid-template-columns: 1fr 1fr; gap: 32px; }
}

.product {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.product:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }

.product-shot {
  display: block;
  padding: 20px 20px 0;
  background: var(--sunken);
  border-bottom: 1px solid var(--border);
}

.product-shot img {
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  transition: transform 0.3s cubic-bezier(.3,.7,.3,1);
  transform-origin: 50% 100%;
}

.product:hover .product-shot img { transform: translateY(-4px); }

.product-body { padding: 24px 24px 28px; }

@media (min-width: 720px) {
  .product-body { padding: 28px 32px 32px; }
}

.product h3 { font-size: 1.5rem; }
.product h3 a { text-decoration: none; }
.product h3 a::after { content: " →"; color: var(--muted); transition: color 0.15s; }
.product h3 a:hover::after { color: var(--link-hover); }
.product-body > p { margin-top: 10px; color: var(--muted); }

.ticks {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.ticks li {
  position: relative;
  padding-left: 26px;
}

.ticks li + li { margin-top: 6px; }

.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.42em;
  width: 12px;
  height: 7px;
  border-left: 2.5px solid var(--text);
  border-bottom: 2.5px solid var(--text);
  transform: rotate(-45deg);
}

/* Why "Oh!" */

.why { display: grid; gap: 48px; }

@media (min-width: 960px) {
  .why { grid-template-columns: 5fr 7fr; gap: 72px; align-items: start; }
  .why-intro { position: sticky; top: 104px; }
}

.why-intro p:not(.eyebrow) { margin-top: 18px; color: var(--muted); font-size: 1.125rem; }

.steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 20px;
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.step-n {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--text);
  font-weight: 800;
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
}

.steps h3 { align-self: center; }
.steps p { margin-top: 8px; color: var(--muted); }

/* Contact */

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 48px;
}

.cta > div { max-width: 36em; }
.cta p { margin-top: 14px; color: var(--muted); font-size: 1.125rem; }

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

.foot {
  padding: 40px 0 48px;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 40px;
}

.foot-logo { width: 140px; height: auto; }

.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
.foot nav a:hover { color: var(--link-hover); }

.foot-note {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 0.875rem;
}

/* ---------- 404 */

.lost {
  display: grid;
  place-items: center;
  min-height: 70vh;
  padding: 64px var(--gutter);
  text-align: center;
}

.lost img { width: 96px; height: 96px; margin: 0 auto 28px; }
.lost h1 { font-size: clamp(2rem, 6vw, 3rem); }
.lost p { margin: 14px auto 28px; max-width: 28em; color: var(--muted); font-size: 1.125rem; }
