/* Yevonn website styles. Colours come from the Yevonn logo. */

/* Fonts are bundled with the site (SIL Open Font License): Hanken Grotesk and Marcellus. */
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/hanken-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/hanken-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/hanken-grotesk-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Marcellus"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/marcellus-latin-400-normal.woff2") format("woff2"); }


:root {
  --paper: #f4f4f1;
  --paper-2: #e8e7e2;
  --ink: #2c2b29;
  --ink-soft: #55534f;
  --teal: #17545e;
  --teal-deep: #0f3b43;
  --copper: #a26639;
  --copper-light: #c38556;
  --copper-ink: #8a5128;
  --copper-button: #d6a06c;
  --copper-btn: #8e6244;
  --hero-teal: #2b5360;
  --hero-teal-a: #234a56;
  --hero-teal-b: #3a6371;
  --hero-copper: #94704f;
  --hero-copper-b: #876448;
  --split: 70.7%;
  --rule: #cdcbc4;
  --error: #9b2c1a;
  --error-on-dark: #ffd9c4;

  --font-display: "Marcellus", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --max: 1160px;
  --pad: clamp(20px, 5vw, 48px);
  --radius: 2px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; margin: 0; color: var(--ink); }
p { margin: 0 0 1em; }

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

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.band--teal :focus-visible { outline-color: var(--paper); }

.skip {
  position: absolute; left: 12px; top: -80px; z-index: 50;
  background: var(--teal); color: var(--paper); padding: 0.6rem 1rem; border-radius: var(--radius);
}
.skip:focus { top: 12px; }

.wrap { width: min(100% - 2 * var(--pad), var(--max)); margin-inline: auto; }
@media (min-width: 1000px) { .wrap { width: min(74%, 1120px); } }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgb(243 242 239 / 0.95);
  backdrop-filter: blur(8px);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: clamp(64px, 5.8vw, 84px); }

.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand .mark { width: 32px; height: auto; }
.brand__word { height: 24px; width: auto; }
.brand__sub { font-weight: 600; color: var(--ink-soft); padding-left: 0.7rem; border-left: 1px solid var(--rule); }
.brand--footer .mark { width: 24px; }
.brand--footer .brand__word { height: 18px; }

.nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 1.75rem; }
.nav a:not(.btn) { color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.nav a:not(.btn):hover { color: var(--teal); text-decoration: underline; }

.nav-toggle {
  display: none; font: inherit; font-weight: 500; color: var(--ink);
  background: none; border: 1px solid var(--ink); border-radius: var(--radius); padding: 0.4rem 0.9rem; cursor: pointer;
}

@media (max-width: 780px) {
  .js .nav-toggle { display: inline-flex; }
  .js .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 1rem;
    padding: 1.25rem var(--pad) 1.5rem; background: var(--paper); border-bottom: 3px solid var(--teal);
  }
  .js .nav.is-open { display: flex; }
}

/* ---------- buttons and links ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
  padding: 0.9rem 1.5rem; border-radius: var(--radius); border: 2px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn--small { padding: 0.55rem 1rem; font-size: 0.95rem; }
.btn--primary { background: var(--teal); color: var(--paper); }
.btn--primary:hover { background: var(--teal-deep); color: var(--paper); }
.btn--copper { background: var(--copper-btn); color: var(--paper); }
.btn--copper:hover { background: var(--teal-deep); color: var(--paper); }
.btn--outline { background: transparent; color: var(--paper); border-color: rgb(244 244 241 / 0.85); border-width: 1px; }
.btn--outline:hover { background: var(--paper); color: var(--hero-teal); }
.btn--light { background: var(--copper-button); color: var(--teal-deep); }
.btn--light:hover { background: var(--paper); color: var(--teal-deep); }
.btn--ghost { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn--ghost:hover { background: var(--teal); color: var(--paper); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.textlink { font-weight: 600; color: var(--teal); }

/* ---------- hero: matches the laptop design ---------- */

.hero {
  position: relative; height: clamp(440px, 36.7vw, 640px); overflow: hidden; color: var(--paper);
  background:
    linear-gradient(180deg, var(--hero-copper) 0%, var(--hero-copper-b) 100%) right / calc(100% - var(--split)) 100% no-repeat,
    linear-gradient(90deg, var(--hero-teal-a) 0%, var(--hero-teal-b) var(--split));
}
.hero__inner { height: 100%; display: flex; align-items: center; position: relative; z-index: 1; }
.hero__copy { max-width: 36rem; padding-bottom: 2.5%; }
.hero h1 {
  font-family: var(--font-body); font-weight: 500; text-transform: uppercase; letter-spacing: 0.02em;
  font-size: clamp(1.55rem, 2.85vw, 2.9rem); line-height: 1.3; color: var(--paper);
}
.hero__lead { font-size: clamp(0.95rem, 1.15vw, 1.1rem); line-height: 1.6; color: rgb(244 244 241 / 0.88); max-width: 31rem; margin: 1.1rem 0 0; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.85rem; margin-top: 1.7rem; }
.hero .btn { padding: 0.72rem 1.35rem; font-size: 0.95rem; }
.hero .btn--copper:hover { background: var(--paper); color: var(--teal-deep); }

/* The Y sits on the join between the two panels, like the laptop design. */
.hero__mark {
  position: absolute; z-index: 1; left: var(--split); top: 8.5%; height: 75%; aspect-ratio: 330 / 326;
  transform: translateX(-50%); pointer-events: none;
}
.mark--hero { width: 100%; height: 100%; filter: drop-shadow(8px 12px 12px rgb(0 0 0 / 0.22)); }

@media (max-width: 1000px) {
  .hero { height: clamp(420px, 52vw, 520px); }
  .hero__copy { max-width: 22rem; }
  .hero h1 { font-size: clamp(1.45rem, 3.6vw, 2rem); }
}
@media (max-width: 760px) {
  .hero { height: auto; background: var(--hero-teal-a); display: block; }
  .hero__inner { padding-block: 44px 36px; display: block; }
  .hero__copy { max-width: none; padding-bottom: 0; }
  .hero h1 { font-size: clamp(1.45rem, 6.4vw, 1.9rem); }
  .hero__mark {
    position: static; transform: none; height: auto; aspect-ratio: auto;
    background: var(--hero-copper); display: flex; justify-content: center; padding-block: 34px;
  }
  .mark--hero { width: min(210px, 56vw); height: auto; }
}

/* One quiet moment of motion: the Y fades up once. */
@media (prefers-reduced-motion: no-preference) {
  .mark--hero { animation: mark-in 0.9s ease-out 0.15s both; }
}
@keyframes mark-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

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

/* ---------- bands ---------- */

.band { padding-block: clamp(64px, 10vw, 120px); }
.band--alt { background: var(--paper-2); }
.band--teal { background: var(--hero-teal); color: var(--paper); }
.band--teal h2 { color: var(--paper); }
.band--teal a { color: var(--paper); }

.section-head { max-width: 40rem; margin-bottom: 2.5rem; }
.section-head h2, .split__copy h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.12; }
.section-head p { margin-top: 1rem; color: var(--ink-soft); }

/* products */
.band--cards { background: var(--paper); padding-block: clamp(28px, 3.4vw, 48px) clamp(56px, 7vw, 88px); }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.25rem; }
.card {
  display: flex; flex-direction: column; gap: 0.6rem; padding: 1.6rem 1.6rem 1.4rem;
  background: #ececea; border-radius: 6px; box-shadow: 0 1px 3px rgb(0 0 0 / 0.07);
}
.card__icon { width: 30px; height: 30px; fill: none; stroke: var(--hero-teal); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 0.35rem; }
.card h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.05rem; line-height: 1.3; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.55; }
.card__foot { margin-top: auto; padding-top: 0.75rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.1rem; }
.status {
  font-size: 0.85rem; font-weight: 600; line-height: 1; white-space: nowrap;
  padding: 0.4rem 0.7rem; border: 1px solid var(--ink-soft); border-radius: var(--radius); color: var(--ink-soft);
}
.status--live { background: var(--hero-teal); border-color: var(--hero-teal); color: var(--paper); }
.note { margin: 1.5rem 0 0; color: var(--ink-soft); font-size: 0.95rem; }

/* principles */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.principle { border-left: 3px solid var(--teal); padding-left: 1.25rem; }
.principle h3 { font-size: 1.45rem; line-height: 1.25; margin-bottom: 0.75rem; }
.principle p { color: var(--ink-soft); margin: 0; }
@media (max-width: 900px) { .principles { grid-template-columns: 1fr; gap: 2rem; } }

/* two-column sections */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.split__copy p { margin-top: 1.1rem; max-width: 30rem; }
.band--teal .split__copy p { color: rgb(243 242 239 / 0.92); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---------- forms ---------- */

.form { display: block; }
.field { display: grid; gap: 0.4rem; margin-bottom: 1.15rem; }
.field label { font-weight: 600; }
.optional { font-weight: 400; opacity: 0.8; }

.form input[type="text"], .form input[type="email"], .form input[type="password"], .form select, .form textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid #85837c; border-radius: var(--radius); padding: 0.75rem 0.85rem;
}
.form textarea { resize: vertical; min-height: 9rem; }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible { outline: 3px solid var(--teal); outline-offset: 1px; }
.form--on-dark input:focus-visible, .form--on-dark select:focus-visible { outline-color: var(--paper); }

.field--check { grid-template-columns: auto 1fr; align-items: start; column-gap: 0.75rem; }
.field--check input { width: 1.25rem; height: 1.25rem; margin-top: 0.2rem; accent-color: var(--copper); }
.field--check label { font-weight: 400; }
.field--check .field-error { grid-column: 1 / -1; }

.field-error { margin: 0; font-size: 0.95rem; font-weight: 500; color: var(--error); }
.form--on-dark .field-error { color: var(--error-on-dark); }
[aria-invalid="true"] { border-color: var(--error) !important; border-width: 2px !important; }
.form--on-dark [aria-invalid="true"] { border-color: var(--error-on-dark) !important; }

.form-status { margin: 1rem 0 0; min-height: 1.5em; font-weight: 500; }
.form-status.is-success { color: var(--teal); }
.form-status.is-error { color: var(--error); }
.form--on-dark .form-status.is-success { color: #d7f0e6; }
.form--on-dark .form-status.is-error { color: var(--error-on-dark); }

/* Hidden trap field for bots. Off-screen, not display:none, so bots still fill it in. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.turnstile-slot:not(:empty) { margin-bottom: 1.15rem; }

/* ---------- footer ---------- */

.site-footer { background: var(--paper-2); position: relative; padding-block: 3rem 2.5rem; }
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--teal) 50%, var(--copper) 50%);
}
.site-footer__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 3rem; align-items: start; }
.site-footer__brand p { margin: 0.75rem 0 0; color: var(--ink-soft); }
.footer-links { display: grid; gap: 0.5rem; justify-items: start; }
.footer-links a { color: var(--ink); }
.site-footer__legal { grid-column: 1 / -1; margin: 1rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: 0.95rem; }
@media (max-width: 640px) { .site-footer__inner { grid-template-columns: 1fr; } }

/* ---------- legal pages ---------- */

.legal { padding-block: clamp(40px, 7vw, 88px); }
.legal__wrap { max-width: 46rem; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.1; }
.legal__updated { color: var(--ink-soft); margin: 0.75rem 0 2rem; }
.legal h2 { font-size: 1.5rem; line-height: 1.25; margin: 2.25rem 0 0.75rem; }
.legal ul { padding-left: 1.25rem; margin: 0 0 1em; }
.legal li { margin-bottom: 0.5rem; }

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

.notfound { padding-block: clamp(56px, 10vw, 128px); }
.notfound h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 1.5rem 0 0.75rem; }
.mark--notfound { width: 96px; height: auto; }

/* ---------- admin ---------- */

.admin { padding-block: clamp(32px, 6vw, 72px); }
.admin h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 1.5rem; }
.admin__login { max-width: 28rem; }
.admin__tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.admin__tabs [role="tab"] {
  font: inherit; font-weight: 600; cursor: pointer; color: var(--ink);
  background: none; border: 1px solid var(--ink-soft); border-radius: var(--radius); padding: 0.5rem 1rem;
}
.admin__tabs [role="tab"][aria-selected="true"] { background: var(--teal); border-color: var(--teal); color: var(--paper); }
.admin__tabs .btn { margin-left: auto; }
.admin__count { color: var(--ink-soft); margin-bottom: 0.75rem; }
.admin__scroll { overflow-x: auto; border: 1px solid var(--rule); background: #fff; }
.admin__table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.admin__table th, .admin__table td { text-align: left; vertical-align: top; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--rule); }
.admin__table th { background: var(--paper-2); font-weight: 600; white-space: nowrap; }
.admin__table td.msg { min-width: 18rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.admin__table td.act { white-space: nowrap; }
.admin__table button { font: inherit; cursor: pointer; color: var(--error); background: none; border: 1px solid var(--error); border-radius: var(--radius); padding: 0.2rem 0.6rem; }
