/* ==========================================================================
   Citra Sourdough Bakery — Coming Soon
   Premium artisan landing page
   ========================================================================== */

/* --- Custom Properties --- */
:root {
  --bg-deep:        #090909;
  --text-warm:      #FBF6EF;
  --accent-brown:   #5B3027;
  --accent-gold:    #EE994A;
  --font-serif:     'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --ease-premium:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth:    cubic-bezier(0.4, 0, 0.2, 1);

  --duration-enter: 1s;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  background-color: var(--bg-deep);
  color: var(--text-warm);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  cursor: none;
}

/* Hide default cursor on interactive elements when custom cursor is active */
a, button, input, label {
  cursor: none;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Background — grain, gradient, vignette
   ========================================================================== */

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  animation: bgFadeIn 1.2s var(--ease-premium) forwards;
}

@keyframes bgFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Soft radial lighting from center-top */
.bg__gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 70% 55% at 50% 28%,
      rgba(91, 48, 39, 0.14) 0%,
      transparent 65%
    ),
    radial-gradient(
      ellipse 50% 40% at 50% 100%,
      rgba(238, 153, 74, 0.04) 0%,
      transparent 60%
    ),
    var(--bg-deep);
}

/* Warm vignette edges */
.bg__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 85% 80% at 50% 50%,
    transparent 40%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

/* Animated film grain overlay */
.bg__grain {
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  animation: grainDrift 12s linear infinite;
  mix-blend-mode: overlay;
}

@keyframes grainDrift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-1.5%, -1%); }
  50%  { transform: translate(1%, 1.5%); }
  75%  { transform: translate(-0.5%, 1%); }
  100% { transform: translate(0, 0); }
}

/* ==========================================================================
   Particles canvas
   ========================================================================== */

#particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ==========================================================================
   Custom cursor
   ========================================================================== */

.cursor {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 1.5px solid rgba(251, 246, 239, 0.7);
  border-radius: 50%;
  background: transparent;
  pointer-events: none;
  z-index: 9999;
  transition:
    width 0.35s var(--ease-premium),
    height 0.35s var(--ease-premium),
    margin 0.35s var(--ease-premium),
    border-color 0.35s var(--ease-premium),
    opacity 0.35s var(--ease-premium);
  will-change: left, top;
}

.cursor--hover {
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  border-color: rgba(238, 153, 74, 0.85);
  opacity: 1;
}

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

.hero {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100dvh;
  padding: 4rem 2rem;
  overflow: hidden;
  will-change: transform;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 640px;
}

/* ==========================================================================
   Staggered entrance animations
   ========================================================================== */

.animate {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp var(--duration-enter) var(--ease-premium) forwards;
  animation-delay: calc(var(--delay, 0ms));
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Logo & warm glow
   ========================================================================== */

.logo-wrap {
  position: relative;
  margin-bottom: 2.5rem;
}

.logo {
  position: relative;
  z-index: 1;
  width: clamp(200px, 28vw, 320px);
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  animation: logoFloat 8s ease-in-out infinite;
  animation-delay: 1.2s;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* ==========================================================================
   Typography
   ========================================================================== */

.tagline {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.25rem, 2.8vw, 1.65rem);
  line-height: 1.45;
  letter-spacing: 0.04em;
  color: rgba(251, 246, 239, 0.78);
  margin-bottom: 2.5rem;
}

/* ==========================================================================
   Email signup form
   ========================================================================== */

.signup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  max-width: 360px;
  margin-bottom: 3.5rem;
}

.email-input {
  width: 100%;
  padding: 1rem 1.5rem;
  background: rgba(251, 246, 239, 0.04);
  border: 1px solid rgba(251, 246, 239, 0.12);
  border-radius: 2px;
  color: var(--text-warm);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  outline: none;
  transition:
    border-color 0.3s var(--ease-smooth),
    box-shadow 0.3s var(--ease-smooth),
    transform 0.3s var(--ease-smooth),
    background 0.3s var(--ease-smooth);
}

.email-input::placeholder {
  color: rgba(251, 246, 239, 0.35);
}

.email-input:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 0 24px rgba(238, 153, 74, 0.12);
}

.email-input:focus {
  border-color: var(--accent-gold);
  background: rgba(251, 246, 239, 0.06);
  box-shadow: 0 0 32px rgba(238, 153, 74, 0.18);
  transform: scale(1.01);
}

/* ==========================================================================
   Notify button
   ========================================================================== */

.notify-btn {
  width: 100%;
  padding: 1rem 2.5rem;
  background: var(--accent-gold);
  border: none;
  border-radius: 2px;
  color: var(--text-warm);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  outline: none;
  transition:
    transform 0.4s var(--ease-premium),
    box-shadow 0.4s var(--ease-premium),
    background 0.4s var(--ease-premium);
}

.notify-btn:hover {
  transform: translateY(-4px);
  background: #F3A456;
  box-shadow:
    0 12px 32px rgba(238, 153, 74, 0.45),
    0 4px 12px rgba(0, 0, 0, 0.3);
}

.notify-btn:active {
  transform: translateY(-1px);
  box-shadow:
    0 6px 16px rgba(238, 153, 74, 0.3),
    0 2px 6px rgba(0, 0, 0, 0.2);
  transition-duration: 0.15s;
}

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

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

.footer__link {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: rgba(251, 246, 239, 0.45);
  text-decoration: none;
  transition: color 0.3s var(--ease-smooth);
}

.footer__link:hover {
  color: var(--accent-gold);
}

.footer__facebook {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: rgba(251, 246, 239, 0.45);
  transition: color 0.3s var(--ease-smooth);
}

.footer__facebook svg {
  width: 100%;
  height: 100%;
}

.footer__facebook:hover {
  color: var(--accent-gold);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Large desktop — 1920px */
@media (min-width: 1920px) {
  .hero__inner {
    max-width: 720px;
  }

  .logo-wrap {
    margin-b 3rem;
  }

  .tagline {
    margin-bottom: 3rem;
  }

  .signup {
    margin-bottom: 4.5rem;
  }
}

/* Desktop — 1440px & 1280px handled by clamp() */

/* Tablet */
@media (max-width: 768px) {
  .hero {
    padding: 3rem 1.5rem;
  }

  .logo-wrap {
    margin-bottom: 2rem;
  }

  .tagline {
    margin-bottom: 2rem;
  }

  .signup {
    margin-bottom: 3rem;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .hero {
    padding: 2.5rem 1.25rem;
  }

  .signup {
    max-width: 100%;
  }

  .notify-btn {
    letter-spacing: 0.14em;
  }
}

/* Touch devices — restore native cursor */
@media (hover: none), (pointer: coarse) {
  body, a, button, input, label {
    cursor: auto;
  }

  .cursor {
    display: none;
  }
}

/* ==========================================================================
   Reduced motion — accessibility
   ========================================================================== */

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

  .bg {
    opacity: 1;
    animation: none;
  }

  .animate {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .logo {
    animation: none;
  }

  .bg__grain {
    animation: none;
  }

  .hero {
    will-change: auto;
  }

  #particles {
    display: none;
  }

  .cursor {
    display: none;
  }

  body, a, button, input, label {
    cursor: auto;
  }
}
