/* ==========================================================================
   Sărbătoricii — landing page
   Design tokens and layout follow design_handoff_sarbatoricii_landing/README.md
   ========================================================================== */

/* Alkatra Medium, self-hosted, used for the wordmark only.
   Subset from the SIL OFL release to Latin + Latin Extended-A/B (keeps
   ă â î ș ț): 511 KB TTF -> 19.7 KB woff2. License in fonts/OFL.txt.
   Lives outside /assets/ so it gets the immutable cache rule on its own —
   _headers applies every matching rule, and overlapping ones concatenate. */
@font-face {
  font-family: 'Alkatra';
  src: url('/fonts/alkatra-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Surfaces */
  --paper: #FBF5EA;
  --paper-warm: #F4EADD;
  --surface: #FFFCF6;
  --peach: #FFF4ED;

  /* Ink */
  --ink: #43352C;
  --ink-heading: #3A2E28;
  --ink-muted: #6E5D50;
  --ink-subtle: #8A7766;
  --ink-faint: #A89684;

  /* Accents */
  --terracotta: #EC7F5E;
  --terracotta-dark: #D9694A;
  --terracotta-error: #C0563C;
  --gold: #E8B24B;
  --gold-light: #F0BE5E;
  --gold-muted: #B0894F;

  /* Borders */
  --border-sand: #EEE1CC;
  --border-input: #E6D7C2;
  --border-pill: #EAD9C2;
  --border-badge: #EAC3AE;
  --border-warm: #F0DFCD;
  --border-footer: #EFE2CC;

  /* Success */
  --success-bg: #F1F4EC;
  --success-border: #CFE0C4;
  --success-title: #3C5A3C;
  --success-body: #5C6B53;

  /* On dark */
  --on-dark: #FBF5EA;
  --on-dark-muted: #D8C9BB;

  /* Type — Alkatra is self-hosted for the wordmark only. Everything else uses
     the platform's own serif/sans: no webfont download, no third-party request. */
  --font-display: ui-serif, Georgia, 'Times New Roman', serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-logo: 'Alkatra', ui-serif, Georgia, serif;

  /* Layout */
  --container: 1180px;
  --gutter: 28px;

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.6, 0.2, 1);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--paper);
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--terracotta); color: #fff; }

img { max-width: 100%; }

.page {
  background: var(--paper);
  overflow: hidden;
  min-height: 100vh;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

/* Honeypot — off-screen, never focusable, hidden from AT */
.hp {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}

:where(a, button, input, .chip):focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
}

.cta-panel :where(a, button, input):focus-visible {
  outline-color: var(--gold);
}

/* ==========================================================================
   Keyframes
   ========================================================================== */

@keyframes sb-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@keyframes sb-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.rise { animation: sb-rise 0.6s var(--ease-out) both; }

/* ==========================================================================
   Header
   ========================================================================== */

.header {
  max-width: var(--container);
  margin: 0 auto;
  padding: 26px var(--gutter) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-family: var(--font-logo);
  font-weight: 500;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.status-badge {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta-dark);
  border: 1.5px solid var(--border-badge);
  background: var(--peach);
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px var(--gutter) 78px;
}

/* a. Rainbow — masked spotlight follows the pointer (mask set from JS) */
.rainbow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.rainbow svg {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
}

/* b. Bunting garland */
.garland-wrap {
  position: relative;
  z-index: 1;
  margin: 6px 0 34px;
}

.garland {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: 50% 0;
  cursor: pointer;
  touch-action: manipulation;
}

/* c. Draggable sun */
.sun {
  position: absolute;
  z-index: 8;
  right: 14px;
  top: -4px;
  width: 112px;
  height: 112px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.sun.is-dragging { cursor: grabbing; }

.sun-svg {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  animation: sb-spin 34s linear infinite;
  transform-origin: 50% 50%;
  filter: drop-shadow(0 8px 16px rgba(180, 130, 40, 0.35));
}

.sun-aura {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 440px;
  height: 440px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border-radius: 50%;
  mix-blend-mode: screen;
  opacity: 0.5;
  background: radial-gradient(circle,
    rgba(255, 247, 220, 0.98) 0%,
    rgba(255, 232, 168, 0.62) 26%,
    rgba(255, 222, 140, 0.28) 48%,
    rgba(255, 216, 128, 0) 72%);
  transition:
    width 0.5s var(--ease-out),
    height 0.5s var(--ease-out),
    opacity 0.4s;
}

.sun.is-dragging .sun-aura {
  width: 560px;
  height: 560px;
  opacity: 0.6;
}

/* d. Copy column */
.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 5.4vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink-heading);
  text-wrap: balance;
}

.h1 em { font-style: italic; }

/* Browsers break after a hyphen; without this the system serif splits
   "într-un" across lines. */
.nowrap { white-space: nowrap; }

.hero-lead {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 34em;
  margin: 22px auto 0;
}

/* ==========================================================================
   Signup form (shared by hero + final CTA)
   ========================================================================== */

.signup {
  margin: 32px auto 0;
  max-width: 460px;
}

.signup--dark {
  margin: 30px auto 0;
  max-width: 440px;
}

.signup-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.signup--light .signup-row { justify-content: center; }

.signup-input {
  flex: 1;
  min-width: 200px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--border-input);
  border-radius: 12px;
  padding: 15px 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.signup-input::placeholder { color: #A89684; }

.signup-input:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 4px rgba(236, 127, 94, 0.16);
}

.signup--dark .signup-input {
  border-color: transparent;
}

.signup--dark .signup-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(232, 178, 75, 0.25);
}

.btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  border: none;
  border-radius: 12px;
  padding: 15px 26px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s, background 0.2s, opacity 0.2s;
}

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

.btn--terracotta { color: #fff; background: var(--terracotta); }
.btn--terracotta:hover { background: var(--terracotta-dark); transform: translateY(-1px); }

.btn--gold { color: var(--ink); background: var(--gold); }
.btn--gold:hover { background: var(--gold-light); transform: translateY(-1px); }

.btn--ink { color: #fff; background: var(--ink); padding: 15px 32px; }
.btn--ink:hover { background: #5A483C; transform: translateY(-1px); }

.btn[disabled] {
  opacity: 0.65;
  cursor: default;
  transform: none;
}

.signup-error {
  color: var(--terracotta-error);
  font-size: 13.5px;
  font-weight: 600;
  margin: 9px 0 0;
}

.signup-error--dark { color: var(--gold-light); }
.signup-error--survey { margin-top: 14px; }

.fineprint {
  margin: 14px 0 0;
  color: var(--ink-subtle);
  font-size: 14px;
  line-height: 1.5;
}

.fineprint--legal {
  margin-top: 8px;
  font-size: 13px;
}

.fineprint--dark { color: var(--on-dark-muted); opacity: 0.8; }

/* Success cards */
.success-title {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--success-title);
}

.success-body {
  margin: 6px 0 0;
  color: var(--success-body);
  font-size: 15px;
  line-height: 1.5;
}

.success--hero {
  margin: 32px auto 0;
  max-width: 460px;
  background: var(--success-bg);
  border: 1.5px solid var(--success-border);
  border-radius: 14px;
  padding: 20px 22px;
  animation: sb-rise 0.4s ease both;
}

.success--cta {
  margin: 28px auto 0;
  max-width: 440px;
  background: rgba(251, 245, 234, 0.1);
  border: 1.5px solid rgba(232, 178, 75, 0.4);
  border-radius: 14px;
  padding: 20px;
  animation: sb-rise 0.4s ease both;
}

.success-title--cta { color: var(--on-dark); }
.success-body--cta { color: var(--on-dark-muted); }

.success--survey {
  max-width: 480px;
  margin: 0 auto;
  background: var(--surface);
  border: 1.5px solid var(--border-sand);
  border-radius: 16px;
  padding: 26px;
  animation: sb-rise 0.4s ease both;
}

.success-title--survey { font-size: 24px; color: var(--ink-heading); }
.success-body--survey { margin: 8px 0 0; color: var(--ink-muted); font-size: 15.5px; }

/* ==========================================================================
   Shared section furniture
   ========================================================================== */

.eyebrow {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-muted);
}

.eyebrow--dark { color: var(--gold); }

.h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 3.9vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 14px 0 0;
  color: var(--ink-heading);
}

.section-lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 14px 0 0;
}

.card-body {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 0;
}

.card-body--why { font-size: 15px; }

/* ==========================================================================
   "Ce găsești la noi"
   ========================================================================== */

.band-craft {
  background: var(--paper-warm);
  padding: 74px 0;
}

.section-intro--craft {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}

.craft-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

.craft-card {
  background: var(--surface);
  border: 1.5px solid var(--border-sand);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 18px 40px -30px rgba(67, 53, 44, 0.4);
  transition: transform 0.12s, border-color 0.2s;
}

.craft-card:hover {
  transform: translateY(-1px);
  border-color: var(--terracotta);
}

.craft-photo {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 18px;
  background: var(--paper-warm);
}

.h3-craft {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  margin: 0 0 8px;
  color: var(--ink-heading);
}

/* ==========================================================================
   "De ce Sărbătoricii"
   ========================================================================== */

.section-why {
  padding-top: 74px;
  padding-bottom: 74px;
}

.section-intro--why {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 46px;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.why-card {
  background: var(--surface);
  border: 1.5px solid var(--border-sand);
  border-radius: 16px;
  padding: 28px 26px;
  transition: transform 0.12s, border-color 0.2s;
}

.why-card:hover {
  transform: translateY(-1px);
  border-color: var(--terracotta);
}

.h3-why {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  margin: 0 0 8px;
  color: var(--ink-heading);
}

/* ==========================================================================
   Interest survey
   ========================================================================== */

.band-survey {
  background: var(--peach);
  padding: 74px 0;
  border-top: 1.5px solid var(--border-warm);
  border-bottom: 1.5px solid var(--border-warm);
}

.survey-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  text-align: center;
}

.h2--survey { font-size: clamp(28px, 3.7vw, 40px); }

.section-lead--survey { margin: 14px 0 30px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.chip {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  border-radius: 999px;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.16s;
  background: var(--surface);
  color: var(--ink-muted);
  border: 1.5px solid var(--border-input);
}

.chip:hover { border-color: var(--terracotta); }

.chip[aria-pressed="true"] {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: #fff;
}

.vote-actions { margin-top: 28px; }

/* ==========================================================================
   Final CTA
   ========================================================================== */

.section-cta {
  padding-top: 84px;
  padding-bottom: 84px;
}

.cta-panel {
  position: relative;
  background: var(--ink);
  border-radius: 26px;
  padding: 64px 40px;
  text-align: center;
  overflow: hidden;
}

.cta-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.cta-blob--gold {
  top: -60px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(232, 178, 75, 0.35), transparent 70%);
}

.cta-blob--terracotta {
  bottom: -70px;
  left: -30px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(236, 127, 94, 0.3), transparent 70%);
}

.cta-content { position: relative; }

.h2--cta {
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.05;
  margin: 14px auto 0;
  color: var(--on-dark);
  max-width: 14em;
}

.cta-lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--on-dark-muted);
  margin: 16px auto 0;
  max-width: 34em;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  border-top: 1.5px solid var(--border-footer);
  background: var(--paper-warm);
}

.footer-row {
  padding: 38px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.logo--footer {
  font-size: 22px;
  letter-spacing: normal;
}

.footer-meta {
  font-size: 13.5px;
  color: var(--ink-subtle);
  margin-top: 3px;
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--border-pill);
  border-radius: 999px;
  padding: 10px 18px;
  transition: transform 0.12s, border-color 0.2s;
}

.pill:hover {
  border-color: var(--terracotta);
  transform: translateY(-1px);
}

.footer-copy {
  text-align: center;
  padding: 0 var(--gutter) 30px;
  color: var(--ink-faint);
  font-size: 13px;
}

/* ==========================================================================
   Responsive
   The prototype was authored desktop-only (1180px). These breakpoints follow
   the "sensible defaults" in the handoff — see README "Responsive".
   ========================================================================== */

@media (max-width: 880px) {
  .craft-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }

  .band-craft, .band-survey { padding: 58px 0; }
  .section-why { padding-top: 58px; padding-bottom: 58px; }
  .section-cta { padding-top: 64px; padding-bottom: 64px; }
  .cta-panel { padding: 48px 26px; }
  .hero { padding-bottom: 58px; }
  .section-intro--craft { margin-bottom: 36px; }
  .section-intro--why { margin-bottom: 34px; }
}

@media (max-width: 768px) {
  .sun {
    width: 84px;
    height: 84px;
    right: 4px;
    top: 2px;
  }
  .sun-aura { width: 300px; height: 300px; }
  .sun.is-dragging .sun-aura { width: 380px; height: 380px; }
  .garland-wrap { margin: 4px 0 26px; }
  .hero-lead { font-size: 17px; }
}

@media (max-width: 620px) {
  :root { --gutter: 18px; }

  .hero { padding-top: 14px; }
  .header { padding-top: 20px; }
  .craft-photo { height: 210px; }
  .h3-craft { font-size: 24px; }
  .card-body { font-size: 15px; }
  .section-lead, .cta-lead { font-size: 16px; }
  .why-card { padding: 24px 22px; }
  .footer-row { justify-content: flex-start; }
}

@media (max-width: 520px) {
  .logo { font-size: 26px; }
  .header { flex-wrap: wrap; gap: 10px; }
  .status-badge { font-size: 10px; letter-spacing: 0.16em; }

  .signup-row { flex-direction: column; align-items: stretch; }
  .signup-input { min-width: 0; width: 100%; }
  .signup-row .btn { width: 100%; }

  .chip { font-size: 14px; padding: 11px 16px; }
  .chips { gap: 10px; }
  .btn--ink { width: 100%; }

  .cta-panel { padding: 40px 20px; border-radius: 20px; }
  .craft-card { padding: 14px; border-radius: 18px; }
  .craft-photo { height: 190px; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

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

  .rainbow { display: none; }
  .garland { cursor: default; }
}
