/* Sandbox Pitch & Putt — product design system */

:root {
  /* Brand palette */
  --forest: #1C492A;
  --forest-deep: #123520;
  --forest-dark: #0E2818;
  --moss: #2C6B43;
  --moss-light: #3E8A57;
  --cream: #EAE2CE;
  --cream-warm: #E0D6BE;
  --sand: #D8CDAE;
  --sand-dark: #B8AC8B;
  --paper: #FFFFFF;
  --canvas: #FFFFFF;
  --ink: #0E1C13;
  --ink-soft: #2C3A30;
  /* clay was warm orange; neutralized to cream so existing references
     flip to a brand-native accent on white canvas.
     clay-deep now carries the "loss/negative" semantic — a muted brick rust
     that pairs with forest+cream without being an alarming red. */
  --clay: #EAE2CE;
  --clay-deep: #9B3A2E;
  --loss: #9B3A2E;
  --loss-soft: #E7B8A7;
  --ball: #FFF8E8;

  /* Modern depth — layered soft shadows */
  --shadow-sm: 0 1px 2px rgba(14,28,19,0.04), 0 2px 8px rgba(14,28,19,0.04);
  --shadow-md: 0 2px 4px rgba(14,28,19,0.04), 0 12px 28px rgba(14,28,19,0.08);
  --shadow-lg: 0 4px 12px rgba(14,28,19,0.06), 0 24px 48px rgba(14,28,19,0.12);
  --shadow-hero: 0 2px 6px rgba(14,28,19,0.05), 0 18px 40px rgba(14,28,19,0.18), 0 32px 72px rgba(14,28,19,0.08);
  --hairline: 1px solid rgba(14,28,19,0.06);
  --hairline-strong: 1px solid rgba(14,28,19,0.1);
  --radius-card: 22px;
  --radius-card-lg: 28px;

  /* Type */
  --font-display: "Bagel Fat One", "Frankfurter", system-ui;
  --font-body: "Archivo", "Helvetica Neue", Helvetica, sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: #191919;
  overscroll-behavior: none;
}

body {
  min-height: 100vh;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
}

/* reusable tokens */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.caption-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 0.95;
}

/* scrollbar styling in-app */
.scroll-hide::-webkit-scrollbar { display: none; }
.scroll-hide { scrollbar-width: none; }

/* dashed paper motif */
.dashed-line {
  background-image: linear-gradient(90deg, currentColor 50%, transparent 50%);
  background-size: 8px 1px;
  background-repeat: repeat-x;
  background-position: 0 50%;
  height: 1px;
  opacity: 0.4;
}

/* subtle paper texture — now on white canvas */
.paper-tex {
  background-color: var(--canvas);
  background-image:
    radial-gradient(rgba(28, 73, 42, 0.035) 1px, transparent 1px),
    radial-gradient(rgba(28, 73, 42, 0.025) 1px, transparent 1px);
  background-size: 16px 16px, 22px 22px;
  background-position: 0 0, 8px 11px;
}

.forest-tex {
  background-color: var(--forest);
  background-image:
    radial-gradient(rgba(234, 226, 206, 0.035) 1px, transparent 1px);
  background-size: 14px 14px;
}

/* simple grain */
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.11  0 0 0 0 0.29  0 0 0 0 0.17  0 0 0 0.12 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}

/* hide default focus ring, add brand one */
:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
}

/* Modern shared surfaces */
.card {
  background: var(--paper);
  border-radius: var(--radius-card);
  border: var(--hairline);
  box-shadow: var(--shadow-sm);
}

.card-hero {
  background: var(--paper);
  border-radius: var(--radius-card-lg);
  border: var(--hairline);
  box-shadow: var(--shadow-hero);
  overflow: hidden;
}

.hairline {
  height: 1px;
  background: rgba(14,28,19,0.08);
  width: 100%;
}

/* Glass header — blurred translucent over content */
.glass {
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: var(--hairline);
}

/* Monospace data number */
.data-num {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.02em;
}

/* Display data number — editorial & huge */
.display-num {
  font-family: var(--font-display);
  line-height: 0.9;
  letter-spacing: -0.03em;
}

/* Animated golf ball indicator */
@keyframes ball-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes shine {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.shine-hover {
  background: linear-gradient(90deg, transparent 0%, rgba(234, 226, 206, 0.15) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shine 3s ease-in-out infinite;
}

/* Phone scale container */
.phone-wrap {
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at top, #1a1a1a 0%, #0a0a0a 100%);
  position: relative;
}

.phone-wrap.mobile { /* fullbleed on small screens */
  background: transparent;
}

/* tweaks panel */
.tweaks-panel {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 1000;
  background: rgba(14, 28, 19, 0.92);
  backdrop-filter: blur(20px);
  color: var(--cream);
  border-radius: 18px;
  border: 1px solid rgba(234, 226, 206, 0.14);
  font-family: var(--font-body);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  max-width: 280px;
  width: 280px;
  overflow: hidden;
}

.tweaks-panel.collapsed {
  width: auto;
}

.tweaks-panel .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(234, 226, 206, 0.12);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}

.tweaks-panel .body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 60vh;
  overflow: auto;
}

.tweak-row label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
  opacity: 0.65;
}

.tweak-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  background: rgba(234, 226, 206, 0.07);
  border-radius: 10px;
  padding: 3px;
}

.tweak-opts button {
  flex: 1;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--cream);
  opacity: 0.6;
  transition: all 0.15s;
}

.tweak-opts button.active {
  background: var(--cream);
  color: var(--forest);
  opacity: 1;
}

.tweak-opts button:hover:not(.active) {
  opacity: 0.9;
}

/* Page transitions */
.screen-enter {
  animation: screen-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes screen-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-in-right {
  animation: slide-right 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes slide-right {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
