/* Tule õue! Pontu ja pall — theme on top of Bootstrap 5.3 */

:root {
  --background: #fbf6ee;
  --foreground: #2d3d2d;
  --card: #fffdf9;
  --primary: #588059;
  --primary-foreground: #fefbf7;
  --accent: #9eccdf;
  --accent-foreground: #13323c;
  --muted-foreground: #5c6b5c;
  --border: #d1cabb;
  --coral: #d0947d;
  --brick: #a85a28;
  --honey: #bb9133;
  --radius-sm: 2px;
  --font-sans: "League Spartan", "Nunito", sans-serif;
  --font-display: "Pally", "League Spartan", sans-serif;
  --copy-fade: radial-gradient(ellipse at center, var(--background) 64%, transparent 100%);

  /* Bootstrap variable overrides */
  --bs-body-font-family: var(--font-sans);
  --bs-body-bg: var(--background);
  --bs-body-color: var(--foreground);
  --bs-body-line-height: 1.5;
  --bs-border-color: var(--border);
  --bs-link-color: var(--foreground);
  --bs-link-color-rgb: 45, 61, 45;
  --bs-link-hover-color: var(--foreground);
  --bs-link-hover-color-rgb: 45, 61, 45;
  --bs-emphasis-color: var(--foreground);
  --bs-heading-color: inherit;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body { -webkit-tap-highlight-color: transparent; }

/* Undo Bootstrap's default spacing — margins are set explicitly */
h1, h2, h3, p, blockquote, figure { margin: 0; }
h1, h2, h3 { font-size: inherit; font-weight: inherit; line-height: inherit; }
h1, h2, h3, .font-display { font-family: var(--font-display); }
img { max-width: 100%; height: auto; display: block; }

/* ---------- helpers ---------- */
.text-brick { color: var(--brick); }
.text-honey { color: var(--honey); }
.text-coral { color: var(--coral); }
.text-muted-fg { color: var(--muted-foreground); }
.text-fg { color: var(--foreground); }
.bg-card { background: var(--card); }
.bb { border-bottom: 1px solid var(--border); }
.leading-relaxed { line-height: 1.625; }

.wrap { width: 100%; margin-inline: auto; padding-inline: 1.5rem; }
.wrap-6xl { max-width: 72rem; }
.wrap-5xl { max-width: 64rem; }
.wrap-3xl { max-width: 48rem; }
.wrap-2xl { max-width: 42rem; }
.max-w-md { max-width: 28rem; }
.max-w-xl { max-width: 36rem; }

@media (min-width: 640px) { .fs-lg-sm { font-size: 1.125rem; line-height: 1.75rem; } }

.link-u {
  color: var(--foreground);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 4px;
}
.link-u:hover { color: var(--foreground); text-decoration-color: var(--foreground); }

/* Section headings: text-3xl → sm:text-4xl */
.h-section { font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; }
@media (min-width: 640px) { .h-section { font-size: 2.25rem; line-height: 2.5rem; } }

/* ---------- buttons (Bootstrap .btn + theme) ---------- */
.btn {
  --bs-btn-font-family: var(--font-display);
  --bs-btn-font-size: .875rem;
  --bs-btn-font-weight: 500;
  --bs-btn-border-radius: var(--radius-sm);
  --bs-btn-box-shadow: none;
  --bs-btn-focus-box-shadow: 0 0 0 1px var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  white-space: nowrap; height: 2.5rem; padding: 0 1.75rem;
  transition: background-color .15s, color .15s;
}
.btn-sm-pill { height: 2rem; padding: 0 1.25rem; --bs-btn-font-size: .75rem; }
.btn-brand {
  --bs-btn-color: var(--primary-foreground);
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-color: var(--primary-foreground);
  --bs-btn-hover-bg: rgba(88, 128, 89, .9);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: var(--primary-foreground);
  --bs-btn-active-bg: var(--primary);
  --bs-btn-active-border-color: var(--primary);
}
.btn-ghost-border {
  --bs-btn-color: var(--foreground);
  --bs-btn-bg: var(--background);
  --bs-btn-border-color: var(--border);
  --bs-btn-hover-color: var(--accent-foreground);
  --bs-btn-hover-bg: var(--accent);
  --bs-btn-hover-border-color: var(--border);
  --bs-btn-active-color: var(--accent-foreground);
  --bs-btn-active-bg: var(--accent);
  --bs-btn-active-border-color: var(--border);
}

/* ---------- header ---------- */
.site-header { background: rgba(251, 246, 238, .95); border-bottom: 1px solid var(--border); }
.site-header .wrap { padding-inline: 1.25rem; padding-block: .75rem; }
.site-nav { gap: 1.25rem; }
.site-nav a {
  font-family: var(--font-display); font-weight: 600; font-size: 1rem; line-height: 1.75rem;
  color: var(--muted-foreground); text-decoration: none;
  text-underline-offset: 6px; text-decoration-thickness: 2px; text-decoration-color: var(--honey);
}
.site-nav a:hover { color: var(--foreground); }
.site-nav a[aria-current="page"] { color: var(--foreground); text-decoration-line: underline; }
@media (min-width: 640px) {
  .site-header .wrap { padding-block: 1rem; }
  .site-nav { gap: 2rem; }
  .site-nav a { font-size: 1.125rem; }
}

/* ---------- patterned sections ---------- */
.patterned { position: relative; isolation: isolate; overflow: hidden; }
.patterned::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url(../assets/img/pontu-pallitaust.webp) repeat;
  background-size: 320px 320px;
  opacity: var(--pattern-opacity, .06);
  mix-blend-mode: multiply;
}

/* Soft radial "glow" behind copy so it stays readable over the pattern */
.copy-fade { position: relative; isolation: isolate; }
.copy-fade::before {
  content: ""; position: absolute; inset: -4rem -5rem; z-index: -1; pointer-events: none;
  background: var(--copy-fade);
}
@media (min-width: 768px) { .copy-fade::before { inset: -7rem -8rem; } }

/* ---------- hero ---------- */
.hero-grid { display: grid; align-items: center; gap: 2rem; padding-block: 2.5rem; }
.hero-cover { order: -1; justify-self: center; position: relative; z-index: 1; }
.hero-cover img { width: 13rem; border: 1px solid var(--border); }
.hero-title { font-size: 2.25rem; line-height: 1.08; font-weight: 600; }
.hero-title span { display: block; margin-top: .25rem; }
.hero-sub { font-size: 1.125rem; line-height: 1.75rem; font-weight: 500; margin-top: 1rem; }
.hero-lead { margin: 1rem auto 0; max-width: 28rem; font-size: 1rem; line-height: 1.625; }
.hero-ctas { margin-top: 1.75rem; }
@media (min-width: 640px) {
  .hero-cover img { width: 16rem; }
  .hero-title { font-size: 3.75rem; }
  .hero-sub { font-size: 1.25rem; }
}
@media (min-width: 768px) {
  .hero-grid { grid-template-columns: 1fr .8fr; gap: 4rem; padding-block: 4rem; }
  .hero-cover { order: 0; }
  .hero-cover img { width: 100%; max-width: 20rem; }
  .hero-lead { margin-left: 0; font-size: 1.125rem; }
}

/* ---------- tags strip ---------- */
.tags { padding-block: 1.5rem; font-size: .875rem; line-height: 1.25rem; }
.tags .dot { margin-inline: .5rem; color: var(--border); }
@media (min-width: 640px) { .tags { font-size: 1rem; line-height: 1.5rem; } }

/* ---------- generic section padding ---------- */
.py-sec { padding-block: 4rem; }
@media (min-width: 640px) { .py-sec { padding-block: 6rem; } }
.py-sec-sm { padding-block: 3.5rem; }
@media (min-width: 640px) { .py-sec-sm { padding-block: 5rem; } }
.stack > * + * { margin-top: 1.25rem; }

/* ---------- carousel (CSS scroll-snap + ~20 lines of JS) ---------- */
.peek { position: relative; max-width: 48rem; margin: 2rem auto 0; padding-inline: 1.75rem; }
@media (min-width: 640px) { .peek { padding-inline: 3rem; } }
.peek-frame { position: relative; }
.peek-viewport { overflow: hidden; }
.peek-track {
  display: flex; margin-left: -1rem;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.peek-track::-webkit-scrollbar { display: none; }
.peek-slide { flex: 0 0 88%; min-width: 0; padding-left: 1rem; scroll-snap-align: start; }
@media (min-width: 640px) { .peek-slide { flex-basis: 44%; } }
@media (min-width: 768px) { .peek-slide { flex-basis: 33%; } }
.peek-slide img { width: 100%; aspect-ratio: 1353 / 1920; object-fit: cover; border: 1px solid var(--border); background: var(--card); }

.peek-btn {
  position: absolute; width: 2rem; height: 2rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--background); color: var(--foreground);
  bottom: -3.25rem; padding: 0; cursor: pointer; transition: background-color .15s;
}
.peek-btn:hover { background: var(--accent); color: var(--accent-foreground); }
.peek-btn:disabled { opacity: .5; pointer-events: none; }
.peek-btn svg { width: 1rem; height: 1rem; }
.peek-prev { left: -1.25rem; }
.peek-next { right: -1.25rem; }
@media (min-width: 640px) {
  .peek-btn { bottom: auto; top: 50%; transform: translateY(-50%); }
  .peek-prev { left: -3rem; }
  .peek-next { right: -3rem; }
}
.peek-count { margin-top: 1rem; text-align: center; font-size: .875rem; }

/* ---------- features ---------- */
.features { --bs-gutter-x: 4rem; --bs-gutter-y: 2.5rem; margin-top: 3rem; }
.feature { border-top: 1px solid var(--border); padding-top: 1.25rem; height: 100%; }
.feature h3 { font-size: 1.25rem; line-height: 1.75rem; font-weight: 600; }
.feature p { margin-top: .5rem; }

/* ---------- author / artist ---------- */
.people { display: grid; gap: 2.5rem; padding-block: 4rem; }
.people h2 { font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; }
.people .artist { border-top: 1px solid var(--border); padding-top: 2.5rem; }
.quote { border-left: 1px solid var(--border); padding-left: 1.25rem; margin-top: 1.25rem; color: var(--foreground); }
.quote > p + p { margin-top: 1rem; }
@media (min-width: 768px) {
  .people { grid-template-columns: 1fr 1fr; gap: 5rem; padding-block: 6rem; }
  .people .artist { border-top: 0; padding-top: 0; border-left: 1px solid var(--border); padding-left: 5rem; }
}

/* ---------- order ---------- */
.eyebrow { font-size: .75rem; line-height: 1rem; font-weight: 600; text-transform: uppercase; }
.price-row { border-block: 1px solid var(--border); padding-block: 1.25rem; margin: 2rem auto 0; }
.price { font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--card); }
.site-footer .wrap { padding-block: 1.75rem; }
.site-footer nav a { font-size: .75rem; font-weight: 500; color: var(--muted-foreground); text-decoration: none; text-underline-offset: 4px; }
.site-footer nav a:hover { text-decoration: underline; }

/* ---------- legal pages ---------- */
.legal { padding-block: 3rem; }
@media (min-width: 640px) { .legal { padding-block: 4rem; } }
.legal h1 { font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; color: var(--foreground); }
.legal h2 { margin-top: 2.5rem; font-size: 1.25rem; line-height: 1.75rem; font-weight: 600; color: var(--foreground); }
@media (min-width: 640px) {
  .legal h1 { font-size: 2.25rem; line-height: 2.5rem; }
  .legal h2 { font-size: 1.5rem; line-height: 2rem; }
}
.legal p, .legal ul { margin-top: .75rem; margin-bottom: 0; }
.legal ul { padding-left: 1.25rem; }
.legal li + li { margin-top: .375rem; }
.legal strong { color: var(--foreground); font-weight: 600; }

/* ---------- simple text pages (Minust, Kontakt) ---------- */
.page { padding-block: 3rem; }
@media (min-width: 640px) { .page { padding-block: 4rem; } }
.page h1 { font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; color: var(--foreground); }
@media (min-width: 640px) { .page h1 { font-size: 2.25rem; line-height: 2.5rem; } }
.prose-lg { margin-top: 1.5rem; }
.prose-lg > p + p { margin-top: 1.25rem; }
@media (min-width: 640px) { .prose-lg { font-size: 1.125rem; line-height: 1.75rem; } }

/* htmx: subtle fade while a boosted page loads */
body.htmx-request main { opacity: .6; transition: opacity .15s; }
