/* ==========================================================================
   KUNEY FLOWERS — foundations
   Pale warm neutrals, editorial serif titles, quiet sans-serif interface.
   ========================================================================== */

:root {
  /* Surfaces */
  --bone: #f4f1ec;
  --bone-warm: #efeae1;
  --travertine: #e8e1d6;
  --stone: #d9d2c6;
  --stone-deep: #c3baab;

  /* Ink */
  --charcoal: #2c2a26;
  --charcoal-soft: #55514a;
  --charcoal-faint: #8b857b;

  /* Accents */
  --sage: #8c9a82;
  --sage-deep: #6e7c66;
  --jade: #4f6b5a;
  --blush: #e8c4c9;

  /* Type — self-hosted (css/fonts.css), with fallbacks that hold the design
     if a font file ever fails: Iowan Old Style and Palatino are both quiet
     editorial serifs already present on macOS and iOS. */
  --serif: 'Cormorant Garamond', 'Iowan Old Style', 'Palatino Linotype', Palatino,
    'Book Antiqua', Georgia, 'Times New Roman', serif;
  --sans: 'Assistant', 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI',
    Roboto, Helvetica, Arial, sans-serif;
  /* Headings — clean uppercase sans with open tracking, after kuneyflowers.com. */
  --heading: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'SFMono-Regular', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Device safe areas (notch, home indicator, rounded corners). Zero on
     anything without them; needs viewport-fit=cover, set in index.html. */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);

  /* Rhythm */
  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --rule: 1px solid rgba(44, 42, 38, 0.14);
  --rule-faint: 1px solid rgba(44, 42, 38, 0.08);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 620ms;
  --dur-fast: 280ms;

  /* Chrome */
  --panel: rgba(244, 241, 236, 0.94);
  --panel-blur: saturate(120%) blur(18px);
  --shadow-soft: 0 1px 2px rgba(44, 42, 38, 0.04), 0 12px 40px -12px rgba(44, 42, 38, 0.18);
  --shadow-lift: 0 2px 4px rgba(44, 42, 38, 0.05), 0 28px 70px -20px rgba(44, 42, 38, 0.26);
}

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

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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--bone);
  color: var(--charcoal);
  font-family: var(--sans);
  /* Matches kuneyflowers.com: Assistant 400, 15px, 0.6px tracking, 1.8 leading. */
  font-size: 15px;
  line-height: 1.8;
  letter-spacing: 0.6px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--heading);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.2;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  margin: 0;
  cursor: pointer;
}

/* No double-tap zoom delay or grey tap flash on controls (iOS Safari). */
a,
button,
label,
summary {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* iOS zooms the page into any field set below 16px, and leaves it zoomed. */
@media (pointer: coarse) {
  input,
  textarea,
  select {
    font-size: max(16px, 1em) !important;
  }
}

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

canvas {
  display: block;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* --- Shared primitives -------------------------------------------------- */

.eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--charcoal-faint);
}

.rule {
  height: 1px;
  background: rgba(44, 42, 38, 0.14);
  border: 0;
  margin: 0;
}

.btn {
  --btn-fg: var(--bone);
  --btn-bg: var(--charcoal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  min-height: 46px;
  padding: 0.75rem 1.65rem;
  border: 1px solid var(--btn-bg);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  transition: background var(--dur-fast) var(--ease-soft),
    color var(--dur-fast) var(--ease-soft),
    border-color var(--dur-fast) var(--ease-soft),
    transform var(--dur-fast) var(--ease-soft);
}

@media (hover: hover) {
  .btn:hover {
    background: transparent;
    color: var(--charcoal);
  }
}

.btn:active {
  transform: translateY(1px);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--charcoal);
  border-color: rgba(44, 42, 38, 0.28);
}

@media (hover: hover) {
  .btn--ghost:hover {
    background: rgba(44, 42, 38, 0.06);
    border-color: rgba(44, 42, 38, 0.5);
  }
}

.btn--sage {
  --btn-bg: var(--sage-deep);
  --btn-fg: #fff;
}

@media (hover: hover) {
  .btn--sage:hover {
    color: var(--sage-deep);
  }
}

/* A truly disabled control is inert. `aria-disabled` is used for controls that
   look unavailable but must still explain why when pressed — a dead primary
   button with no feedback is worse than none. */
.btn[disabled] {
  opacity: 0.36;
  pointer-events: none;
}

.btn[aria-disabled='true'] {
  opacity: 0.42;
  cursor: default;
}

@media (hover: hover) {
  .btn[aria-disabled='true']:hover {
    background: var(--btn-bg);
    color: var(--btn-fg);
  }
}

/* Icon-only control used inside the 3D space */
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(44, 42, 38, 0.16);
  background: var(--panel);
  -webkit-backdrop-filter: var(--panel-blur);
  backdrop-filter: var(--panel-blur);
  color: var(--charcoal-soft);
  transition: color var(--dur-fast) var(--ease-soft),
    border-color var(--dur-fast) var(--ease-soft),
    background var(--dur-fast) var(--ease-soft);
}

@media (hover: hover) {
  .icon-btn:hover {
    color: var(--charcoal);
    border-color: rgba(44, 42, 38, 0.4);
  }
}

.icon-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- Accessibility ------------------------------------------------------ */

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 999;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: var(--charcoal);
  color: var(--bone);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: translateY(-160%);
  transition: transform var(--dur-fast) var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

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

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