/* =========================================================
   Clemons Collectibles — beachy pastel splash page
   ========================================================= */

:root {
  --eggshell: #f4f1de;
  --burnt-peach: #e07a5f;
  --twilight-indigo: #3d405b;
  --muted-teal: #81b29a;
  --apricot-cream: #f2cc8f;

  --ink: #3d405b;
  --ink-soft: #3d405b99;

  /* Typography */
  --font-display: "Caprasimo", "Fraunces", Georgia, serif;
  --font-serif: "Fraunces", Georgia, serif;
  --font-sans: "DM Sans", system-ui, -apple-system, sans-serif;

  /* Layout */
  --maxw: 1200px;
  --pad-x: clamp(20px, 4vw, 56px);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 80% 0%, #f7d9b2 0%, transparent 55%),
    radial-gradient(ellipse at 0% 30%, #d8e7d8 0%, transparent 55%),
    radial-gradient(ellipse at 50% 100%, #f2cc8f80 0%, transparent 60%),
    var(--eggshell);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

/* =========================================================
   Atmosphere — sun, orbs, cards, grain
   ========================================================= */
.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.grain {
  position: absolute;
  inset: -50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.24 0 0 0 0 0.25 0 0 0 0 0.36 0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.45'/></svg>");
  opacity: 0.25;
  mix-blend-mode: multiply;
  animation: grain-shift 8s steps(6) infinite;
}

@keyframes grain-shift {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 1%); }
}

.sun {
  position: absolute;
  top: -120px;
  right: -120px;
  width: 540px;
  height: 540px;
  opacity: 0.85;
  animation: sun-rise 1.6s var(--ease-out) both, sun-spin 80s linear infinite;
  transform-origin: center;
}

.sun-rays {
  transform-origin: 200px 200px;
  animation: rays-spin 24s linear infinite;
}

@keyframes sun-rise {
  from { transform: translate(40px, 80px) scale(0.85); opacity: 0; }
  to   { transform: translate(0, 0) scale(1); opacity: 0.85; }
}
@keyframes sun-spin { to { transform: rotate(360deg); } }
@keyframes rays-spin { to { transform: rotate(360deg); } }

/* Orbs */
.orb {
  position: absolute;
  width: 110px;
  height: 110px;
  filter: drop-shadow(0 16px 28px rgba(61, 64, 91, 0.18));
  opacity: 0;
  animation: orb-pop 0.9s var(--ease-out) forwards, orb-float 7s ease-in-out infinite;
}
.orb svg { width: 100%; height: 100%; display: block; }

.orb-1 {
  top: 18%;
  left: 6%;
  animation-delay: 0.6s, 1.5s;
  width: 90px;
  height: 90px;
}
.orb-2 {
  top: 64%;
  left: 4%;
  animation-delay: 0.85s, 1.5s;
  width: 70px;
  height: 70px;
}
.orb-3 {
  top: 50%;
  right: 7%;
  animation-delay: 1.05s, 1.5s;
  width: 100px;
  height: 100px;
}

@keyframes orb-pop {
  from { opacity: 0; transform: scale(0.4) rotate(-30deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes orb-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-18px) rotate(3deg); }
}

/* Card silhouettes */
.card-float {
  position: absolute;
  width: 130px;
  aspect-ratio: 5 / 7;
  background: var(--eggshell);
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 18px 36px rgba(61, 64, 91, 0.18), inset 0 0 0 4px var(--apricot-cream);
  opacity: 0;
  animation: card-pop 1s var(--ease-out) forwards, card-float 9s ease-in-out infinite;
}

.card-inner {
  height: 100%;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: linear-gradient(160deg, #fff8e8, var(--eggshell));
}

.card-window {
  flex: 1;
  background:
    radial-gradient(circle at 30% 30%, var(--apricot-cream), var(--burnt-peach));
  border: 2px solid var(--ink);
  border-radius: 6px;
}

.card-bar {
  height: 6px;
  background: var(--ink);
  border-radius: 3px;
  opacity: 0.35;
}
.card-bar.short { width: 60%; }

.card-float-1 {
  top: 10%;
  right: 18%;
  transform: rotate(-8deg);
  animation-delay: 1.2s, 2s;
}
.card-float-2 {
  bottom: 12%;
  right: 10%;
  width: 100px;
  transform: rotate(12deg);
  animation-delay: 1.4s, 2.4s;
}

@keyframes card-pop {
  from { opacity: 0; transform: translateY(40px) rotate(-25deg); }
  to   { opacity: 0.9; }
}
.card-float-1 { --rot: -8deg; }
.card-float-2 { --rot: 12deg; }

@keyframes card-float {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50%      { transform: translateY(-22px) rotate(calc(var(--rot, 0deg) + 4deg)); }
}

/* =========================================================
   Top bar
   ========================================================= */
.topbar {
  position: relative;
  z-index: 5;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px var(--pad-x) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  animation: fade-down 0.9s var(--ease-out) both;
}

@keyframes fade-down {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-block;
  filter: drop-shadow(0 4px 6px rgba(61, 64, 91, 0.15));
  transition: transform 0.5s var(--ease-out);
}
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand:hover .brand-mark { transform: rotate(20deg) scale(1.05); }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.5px;
  color: var(--ink);
}
.brand-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--burnt-peach);
  letter-spacing: 0.4px;
  margin-top: 2px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.loc-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--eggshell);
  letter-spacing: 0.3px;
}
.loc-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted-teal);
  box-shadow: 0 0 0 0 var(--muted-teal);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(129, 178, 154, 0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(129, 178, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(129, 178, 154, 0); }
}

.contact-link {
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  position: relative;
  padding: 4px 2px;
  transition: color 0.3s ease;
}
.contact-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--burnt-peach);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-out);
}
.contact-link:hover { color: var(--burnt-peach); }
.contact-link:hover::after { transform: scaleX(1); }

@media (max-width: 600px) {
  .loc-pill { display: none; }
}

/* =========================================================
   Hero
   ========================================================= */
main {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.hero {
  position: relative;
  padding: clamp(60px, 11vw, 130px) 0 clamp(40px, 7vw, 90px);
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 28px;
}
.eyebrow-line {
  display: inline-block;
  width: 38px;
  height: 1.5px;
  background: var(--ink-soft);
  border-radius: 2px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(54px, 11vw, 142px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 32px;
}
.hero-title .word {
  display: inline-block;
  margin: 0 4px;
}
.hero-title .italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  color: var(--burnt-peach);
}

.hero-sub {
  max-width: 620px;
  margin: 0 auto 40px;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.6;
  color: var(--ink);
  opacity: 0.85;
}

.hero-cta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 18px 28px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--eggshell);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.2px;
  box-shadow:
    0 8px 0 #2a2c41,
    0 16px 32px rgba(61, 64, 91, 0.3);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background-color 0.3s ease;
  overflow: hidden;
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(244, 241, 222, 0.18) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.85s var(--ease-out);
}
.btn-primary:hover {
  background: var(--burnt-peach);
  transform: translateY(-3px);
  box-shadow:
    0 11px 0 #b65b44,
    0 20px 36px rgba(224, 122, 95, 0.4);
}
.btn-primary:hover::before { transform: translateX(120%); }
.btn-primary:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #2a2c41, 0 4px 10px rgba(61, 64, 91, 0.3);
}

.btn-label {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  font-weight: 500;
}
.btn-email {
  font-size: 15px;
  font-weight: 500;
  opacity: 0.85;
  border-left: 1px solid rgba(244, 241, 222, 0.3);
  padding-left: 16px;
}
.btn-arrow {
  font-size: 18px;
  transition: transform 0.3s var(--ease-out);
}
.btn-primary:hover .btn-arrow { transform: translateX(4px); }

.cta-aside {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-soft);
}

@media (max-width: 540px) {
  .btn-email { display: none; }
}

/* =========================================================
   Marquee
   ========================================================= */
.marquee {
  position: relative;
  z-index: 2;
  margin: clamp(20px, 4vw, 40px) 0;
  padding: 18px 0;
  background: var(--ink);
  color: var(--eggshell);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
  transform: rotate(-1.4deg);
  box-shadow: 0 14px 30px rgba(61, 64, 91, 0.18);
}

.marquee-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: marquee 40s linear infinite;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.m-item {
  display: inline-flex;
  align-items: center;
}
.m-item:nth-child(odd) { color: var(--apricot-cream); }
.m-item:nth-child(even) { color: var(--eggshell); }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =========================================================
   Pillars
   ========================================================= */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 36px);
  padding: clamp(60px, 8vw, 110px) 0;
}

@media (max-width: 880px) {
  .pillars { grid-template-columns: 1fr; }
}

.pillar {
  position: relative;
  background: var(--eggshell);
  border: 2px solid var(--ink);
  border-radius: 22px;
  padding: 30px 26px 28px;
  box-shadow: 0 10px 0 var(--ink);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), background-color 0.3s ease;
}
.pillar:hover {
  transform: translate(-3px, -6px);
  box-shadow: 0 16px 0 var(--ink);
  background: #fff8e6;
}
.pillar:nth-child(2) {
  background: var(--muted-teal);
  color: var(--eggshell);
}
.pillar:nth-child(2):hover { background: #6fa087; }
.pillar:nth-child(3) {
  background: var(--apricot-cream);
}
.pillar:nth-child(3):hover { background: #efc079; }

.pillar-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 144;
  font-size: 16px;
  letter-spacing: 0.2em;
  margin-bottom: 16px;
  opacity: 0.7;
}

.pillar-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}

.pillar-body {
  font-size: 15.5px;
  line-height: 1.55;
  margin: 0;
  opacity: 0.92;
}

/* =========================================================
   Contact
   ========================================================= */
.contact {
  padding: clamp(40px, 6vw, 80px) 0 clamp(60px, 8vw, 100px);
}

.contact-card {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 70px) clamp(28px, 5vw, 60px);
  background: var(--eggshell);
  border: 2px solid var(--ink);
  border-radius: 28px;
  text-align: center;
  box-shadow: 0 12px 0 var(--ink);
  overflow: hidden;
}

.contact-decor {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 220px;
  height: 220px;
  opacity: 0.5;
  pointer-events: none;
  animation: decor-spin 60s linear infinite;
}
.contact-decor svg { width: 100%; height: 100%; }
@keyframes decor-spin { to { transform: rotate(360deg); } }

.contact-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--burnt-peach);
  margin: 0 0 18px;
}

.contact-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 36px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}
.contact-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  color: var(--burnt-peach);
}

.email-big {
  position: relative;
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 48px);
  text-decoration: none;
  color: var(--ink);
  padding: 6px 4px 14px;
  transition: transform 0.4s var(--ease-out), color 0.3s ease;
  margin-bottom: 18px;
}
.email-big:hover {
  color: var(--burnt-peach);
  transform: translateY(-3px);
}
.email-big .underline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 12px;
  stroke-dasharray: 800;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.7s var(--ease-out);
}
.email-big:hover .underline path {
  animation: doodle 1s var(--ease-out);
}
@keyframes doodle {
  0%   { stroke-dasharray: 800; stroke-dashoffset: 800; }
  100% { stroke-dasharray: 800; stroke-dashoffset: 0; }
}

.contact-foot {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-soft);
  margin: 8px 0 0;
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px var(--pad-x) 50px;
  border-top: 1.5px dashed var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-top: 30px;
}
.footer a { color: var(--ink-soft); text-decoration: none; transition: color 0.3s ease; }
.footer a:hover { color: var(--burnt-peach); }

.footer-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.foot-dot { opacity: 0.6; }
.foot-brand { font-weight: 500; }
.footer-tag {
  font-family: var(--font-serif);
  font-style: italic;
  letter-spacing: 0.3px;
}

/* =========================================================
   Reveal animations
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal-up 0.9s var(--ease-out) forwards;
  animation-delay: var(--d, 0ms);
}

@keyframes reveal-up {
  to { opacity: 1; transform: translateY(0); }
}

/* Progressive enhancement — content shows by default, only hidden when JS loaded */
.js .reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.js .reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger pillars on scroll-in */
.js .reveal-on-scroll.is-visible:nth-of-type(1) { transition-delay: 0ms; }
.js .reveal-on-scroll.is-visible:nth-of-type(2) { transition-delay: 120ms; }
.js .reveal-on-scroll.is-visible:nth-of-type(3) { transition-delay: 240ms; }

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-on-scroll { opacity: 1; transform: none; }
}

/* =========================================================
   Responsive tweaks
   ========================================================= */
@media (max-width: 700px) {
  .sun { width: 360px; height: 360px; top: -80px; right: -80px; }
  .orb-1 { width: 64px; height: 64px; }
  .orb-2 { width: 50px; height: 50px; left: 6%; top: 70%; }
  .orb-3 { width: 70px; height: 70px; right: 5%; top: 56%; }
  .card-float { display: none; }
  .marquee-track { font-size: 17px; gap: 38px; }
  .hero { padding-top: 60px; }
}
