/**
 * Tokens, reset, typography, buttons and form controls.
 */

@font-face {
  font-family: "Fredoka";
  src: url(../fonts/fredoka-latin.woff2) format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url(../fonts/nunitosans-latin.woff2) format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  /* Brand: the logo's sky-to-cyan gradient, orange for actions, mint for eco. */
  --sky-700: #0670b8;
  --sky-600: #0a8fe0;
  --cyan-500: #00c8e8;
  --cyan-100: #e3f7fc;
  --orange-600: #d9521b;
  --orange-500: #f2652b;
  --orange-100: #fff0e8;
  --mint-700: #17734a;
  --mint-100: #e7f6ee;
  --star: #ffb020;

  --ink: #14283a;
  --ink-soft: #4a5d6e;
  --line: #dbe6ee;
  --bg: #f6fafc;
  --surface: #fff;

  --brand-gradient: linear-gradient(100deg, var(--sky-600) 0%, var(--cyan-500) 100%);

  --font-display: "Fredoka", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgb(20 40 58 / 6%), 0 2px 8px rgb(20 40 58 / 6%);
  --shadow: 0 2px 6px rgb(20 40 58 / 6%), 0 12px 32px rgb(20 40 58 / 10%);

  --space: clamp(1rem, 0.6rem + 1.6vw, 1.75rem);
  --section: clamp(3rem, 2rem + 4vw, 6rem);
  --container: 1200px;
  --header-h: 72px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  overflow-x: clip;
}

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

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem); }
h4 { font-size: 1.1rem; }

p,
ul,
ol {
  margin: 0 0 1em;
}

a {
  color: var(--sky-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover {
  color: var(--orange-600);
}

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

.visually-hidden {
  position: absolute !important;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  word-wrap: normal;
}
.visually-hidden.focusable:is(:active, :focus) {
  position: static !important;
  overflow: visible;
  clip: auto;
  width: auto;
  height: auto;
}
.skip-link:focus {
  position: absolute !important;
  z-index: 100;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
}
.hidden,
[hidden] {
  display: none !important;
}

.eyebrow {
  margin-bottom: 0.5rem;
  color: var(--orange-600);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Long-form text from the editor. */
.prose > :first-child { margin-top: 0; }
.prose h2,
.prose h3 {
  margin-top: 1.6em;
}
.prose img {
  border-radius: var(--radius);
}
.prose ul {
  padding-left: 1.2em;
}
.prose li {
  margin-bottom: 0.4em;
}
.prose li::marker {
  color: var(--orange-500);
}

/* Buttons ------------------------------------------------------------- */
.button,
.form-submit,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 0.6em 1.3em;
  border: 2px solid var(--sky-600);
  border-radius: 999px;
  background: var(--surface);
  color: var(--sky-700);
  font: 700 1rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.button:hover,
.form-submit:hover {
  border-color: var(--sky-700);
  background: var(--cyan-100);
  color: var(--sky-700);
}
.button--primary,
.form-submit.button--primary,
#edit-actions-next,
#edit-checkout,
.form-actions .form-submit[value="Pay and complete purchase"] {
  border-color: var(--orange-500);
  background: var(--orange-500);
  color: #fff;
}
.button--primary:hover,
.form-submit.button--primary:hover,
#edit-actions-next:hover,
#edit-checkout:hover {
  border-color: var(--orange-600);
  background: var(--orange-600);
  color: #fff;
}
.button--ghost {
  border-color: rgb(255 255 255 / 70%);
  background: transparent;
  color: #fff;
}
.button--ghost:hover {
  border-color: #fff;
  background: rgb(255 255 255 / 15%);
  color: #fff;
}
.button--lg {
  min-height: 52px;
  padding: 0.75em 1.6em;
  font-size: 1.05rem;
}
.button:active,
.form-submit:active {
  transform: translateY(1px);
}

/* Forms --------------------------------------------------------------- */
.form-item,
.js-form-item {
  margin: 0 0 1.1rem;
}
label,
.form-item__label,
legend {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ink);
  font-weight: 700;
}
input:is([type="text"], [type="email"], [type="password"], [type="tel"], [type="number"], [type="search"], [type="url"]),
select,
textarea {
  width: 100%;
  max-width: 34rem;
  min-height: 46px;
  padding: 0.55rem 0.8rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--sky-600);
  outline: 3px solid rgb(10 143 224 / 20%);
  outline-offset: 0;
}
input[type="number"] {
  max-width: 6rem;
}
.description,
.form-item__description {
  margin-top: 0.3rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
fieldset {
  min-width: 0;
  margin: 0 0 1.5rem;
  padding: 0;
  border: 0;
}
.form-required::after {
  content: " *";
  color: var(--orange-600);
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
input[type="checkbox"],
input[type="radio"] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--orange-500);
}
.form-type-checkbox label,
.form-type-radio label {
  display: inline;
  font-weight: 600;
}
.error,
input.error {
  border-color: #c62828;
}

/* Tables -------------------------------------------------------------- */
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
th {
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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