/* Dew Atelier — organic minimalism (Appily onehundredtwenty design system) */

:root {
  /* Palette — warm seed-bed neutrals + grounded greens (not washed out) */
  --at-canvas: #e9e2d6;
  --at-canvas-deep: #ddd4c4;
  --at-surface: #f5efe4;
  --at-ink: #18241c;
  --at-ink-soft: #3d4f44;
  --at-moss: #2f5340;
  --at-moss-light: #5f8269;
  --at-dew: #b8cdd8;
  --at-dew-deep: #8fadb9;
  --at-terra: #9a5634;
  --at-terra-soft: #c4896a;
  --at-line: rgba(24, 36, 28, 0.2);
  --at-focus: #35607a;

  /* Typography */
  --at-font-display: "Gentium Book Plus", "Georgia", serif;
  --at-font-body: "Gentium Book Plus", "Georgia", serif;
  --at-font-ui: "Hanken Grotesk", system-ui, sans-serif;

  --at-text-xs: clamp(0.75rem, 0.72rem + 0.1vw, 0.8125rem);
  --at-text-sm: clamp(0.875rem, 0.84rem + 0.15vw, 0.9375rem);
  --at-text-md: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --at-text-lg: clamp(1.2rem, 1.05rem + 0.5vw, 1.45rem);
  --at-text-xl: clamp(1.65rem, 1.35rem + 1vw, 2.35rem);
  --at-text-display: clamp(2.1rem, 1.5rem + 2.2vw, 3.25rem);

  /* Spacing */
  --at-space-1: 0.25rem;
  --at-space-2: 0.5rem;
  --at-space-3: 0.75rem;
  --at-space-4: 1rem;
  --at-space-5: 1.5rem;
  --at-space-6: 2rem;
  --at-space-7: 3rem;
  --at-space-8: 4.5rem;

  /* Radius */
  --at-radius-sm: 0.5rem;
  --at-radius-md: 1rem;
  --at-radius-lg: 1.75rem;
  --at-radius-xl: 2.5rem;
  --at-radius-pill: 999px;

  /* Elevation */
  --at-shadow-sm: 0 2px 14px rgba(24, 36, 28, 0.09);
  --at-shadow-md: 0 12px 36px rgba(24, 36, 28, 0.14);
  --at-shadow-lg: 0 24px 52px rgba(24, 36, 28, 0.16);

  /* Motion */
  --at-ease: cubic-bezier(0.25, 0.8, 0.25, 1);
  --at-dur: 220ms;

  /* Layout */
  --at-max: 76rem;
  --at-nav-h: 5.5rem;
  --at-gutter: clamp(1rem, 3vw, 2rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.a120-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--at-font-body);
  font-size: var(--at-text-md);
  line-height: 1.6;
  color: var(--at-ink);
  background: var(--at-canvas);
  background-image:
    radial-gradient(ellipse 85% 55% at 100% -5%, rgba(154, 86, 52, 0.12), transparent 58%),
    radial-gradient(ellipse 70% 45% at 0% 100%, rgba(47, 83, 64, 0.18), transparent 52%),
    radial-gradient(ellipse 50% 35% at 50% 0%, rgba(184, 205, 216, 0.22), transparent 60%);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--at-moss);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--at-terra);
}

:focus-visible {
  outline: 3px solid var(--at-focus);
  outline-offset: 3px;
}

body.a120-body :is(
  label,
  legend,
  dt,
  .ds-kicker,
  .ds-field > span,
  [class*="-label"],
  [class*="-kicker"]
):not(.visually-hidden):not(.a120-skip) {
  position: relative;
  top: auto;
  bottom: auto;
  left: auto;
  right: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.a120-skip {
  position: absolute;
  left: var(--at-space-4);
  top: var(--at-space-4);
  z-index: 10000;
  padding: var(--at-space-3) var(--at-space-4);
  background: var(--at-surface);
  border-radius: var(--at-radius-sm);
  font-family: var(--at-font-ui);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform var(--at-dur) var(--at-ease);
}

.a120-skip:focus {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Legacy commerce aliases (other routes until restyled) */
:root {
  --tl-abyss: var(--at-ink);
  --tl-abyss-deep: #152019;
  --tl-kelp: var(--at-moss);
  --tl-kelp-bright: var(--at-moss-light);
  --tl-coral: var(--at-terra);
  --tl-coral-deep: #8a4f30;
  --tl-foam: var(--at-canvas);
  --tl-sand: var(--at-canvas-deep);
  --tl-pearl: var(--at-surface);
  --tl-ink: var(--at-ink);
  --tl-mute: var(--at-ink-soft);
  --tl-line: var(--at-line);
  --tl-font-display: var(--at-font-display);
  --tl-font-ui: var(--at-font-ui);
  --tl-space-1: var(--at-space-1);
  --tl-space-2: var(--at-space-2);
  --tl-space-3: var(--at-space-3);
  --tl-space-4: var(--at-space-4);
  --tl-space-5: var(--at-space-5);
  --tl-space-6: var(--at-space-6);
  --tl-space-7: var(--at-space-7);
  --tl-space-8: var(--at-space-8);
  --tl-radius-sm: var(--at-radius-sm);
  --tl-radius-md: var(--at-radius-md);
  --tl-radius-lg: var(--at-radius-lg);
  --tl-shadow-sm: var(--at-shadow-sm);
  --tl-shadow-md: var(--at-shadow-md);
  --tl-max: var(--at-max);
  --tl-nav-h: var(--at-nav-h);
  --rp-paper: var(--at-canvas);
  --rp-ink: var(--at-ink);
  --a119-primary: var(--at-moss);
  --a119-accent: var(--at-terra);
}
