/* =============================================
   Adorably Tiny — Coming Soon
   Design system: assets/adorably-tiny-brand-guide.md
   Visual target: high-fidelity mockup
   ============================================= */

:root {
  /* Backgrounds */
  --color-ivory: #FBF6EF;
  --color-oat: #F4EBDD;
  --color-sand: #EFE1CE;
  --color-blush-wash: #F1DFD8;

  /* Text */
  --color-ink: #2B241F;
  --color-cocoa: #5A4C3F;
  --color-taupe: #948573;
  --color-inverse: #FBF6EF;

  /* Buttons */
  --color-btn-primary: #3B2F26;
  --color-btn-primary-hover: #2B221B;
  --color-btn-outline-border: #C9B8A2;
  --color-btn-outline-hover-bg: #F4EBDD;

  /* Borders */
  --color-border-soft: #E6D9C8;
  --color-border-divider: #E9DFD1;
  --color-border-focus: #B98868;

  /* Accent */
  --color-clay: #B98868;
  --color-clay-deep: #9C6B4C;
  --color-terracotta-blush: #D9A692;

  /* Muted / tonal */
  --color-muted-sand: #DCC9AF;
  --color-muted-clay: #C89E82;
  --color-muted-cocoa: #8B6F58;

  /* System */
  --color-success: #7C8B6F;
  --color-warning: #C99A4A;
  --color-error: #B4634F;

  /* Type */
  --font-heading: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Jost', 'Helvetica Neue', Arial, sans-serif;

  --text-h1: 36px;
  --text-h2: 28px;
  --text-h3: 22px;
  --text-h4: 22px;
  --text-body-lg: 18px;
  --text-body: 16px;
  --text-body-sm: 14px;
  --text-eyebrow: 12px;
  --text-button: 13px;
  --text-nav: 13px;
  --text-caption: 12px;

  /* Layout */
  --container-max: 1200px;
  --container-wide: 1320px;

  --space-section-desktop: 120px;
  --space-section-tablet: 88px;
  --space-section-mobile: 64px;

  --space-xl: 64px;
  --space-lg: 48px;
  --space-md: 32px;
  --space-sm: 16px;
  --space-xs: 8px;

  --radius-sm: 8px;
  --radius-md: 20px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-soft: 0 8px 30px rgba(58, 44, 32, 0.06);
  --shadow-card: 0 4px 16px rgba(58, 44, 32, 0.05);

  /* Motion */
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-load: 800ms;
  --duration-hover: 280ms;
  --duration-card: 400ms;

  --header-height-mobile: 72px;
  --header-height-desktop: 88px;
}

@media (min-width: 768px) {
  :root {
    --text-h1: 56px;
    --text-h2: 40px;
    --text-h3: 28px;
    --text-h4: 22px;
    --text-button: 14px;
    --text-nav: 14px;
  }
}

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

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-cocoa);
  background-color: var(--color-ivory);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

figure {
  margin: 0;
}

button {
  font: inherit;
  cursor: pointer;
}

/* Page load animation */
@media (prefers-reduced-motion: no-preference) {
  .animate-in {
    animation: rise-in var(--duration-load) var(--ease-soft) both;
  }

  .animate-in--delay-1 { animation-delay: 80ms; }
  .animate-in--delay-2 { animation-delay: 160ms; }
  .animate-in--delay-3 { animation-delay: 240ms; }
  .animate-in--delay-4 { animation-delay: 320ms; }
}

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

/* Typography utilities */
.h4,
.feature-card h2 {
  font-family: var(--font-heading);
  font-size: var(--text-h4);
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--color-ink);
}

.body-lg {
  font-size: var(--text-body-lg);
  line-height: 1.6;
  font-weight: 300;
}

.body-sm {
  font-size: var(--text-body-sm);
  line-height: 1.6;
  font-weight: 300;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-clay);
}

.nav-link {
  font-family: var(--font-body);
  font-size: var(--text-nav);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--color-cocoa);
  transition: color var(--duration-hover) ease;
}

.nav-link:hover {
  color: var(--color-clay);
}

.caption {
  font-size: var(--text-caption);
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--color-taupe);
}

.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;
}

/* Layout — shared page shell for aligned edges */
.page-shell {
  box-sizing: border-box;
  width: min(calc(100% - 96px), 1240px);
  max-width: 1240px;
  margin-inline: auto;
}

@media (max-width: 1024px) {
  .page-shell {
    width: min(calc(100% - 64px), 1240px);
  }
}

@media (max-width: 767px) {
  .page-shell {
    width: min(calc(100% - 40px), 1240px);
  }
}

/* Header */
.header-wrap {
  position: relative;
  z-index: 10;
  padding-top: 0;
}

.site-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 88px;
  padding-bottom: 24px;
  gap: var(--space-md);
}

.header-rule {
  height: 1px;
  background: var(--color-border-divider);
}

.logo-link {
  flex-shrink: 0;
  display: block;
  line-height: 0;
}

.logo-link:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.logo {
  display: block;
  width: 148px;
  height: auto;
  max-width: none;
  object-fit: contain;
}

.site-nav {
  display: flex;
  align-items: flex-end;
  gap: 44px;
  padding-bottom: 2px;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: flex-end;
  gap: 6px;
  width: 44px;
  height: 44px;
  margin-bottom: -6px;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background-color: var(--color-cocoa);
  transition: transform var(--duration-hover) ease;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

.site-header.nav-open .site-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(251, 246, 239, 0.97);
  backdrop-filter: blur(8px);
  padding: var(--space-sm) 20px var(--space-md);
  gap: var(--space-sm);
  border-bottom: 1px solid var(--color-border-divider);
}

/* Main */
main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
  flex: 1;
  padding-block: 48px 64px;
}

.hero-content {
  max-width: 560px;
}

/* .hero-content .eyebrow {
  margin-bottom: var(--space-sm);
} */

.hero-headline {
  font-family: var(--font-heading);
  font-size: var(--text-h1);
  line-height: 1.12;
  font-weight: 400;
  color: var(--color-ink);
  margin-bottom: var(--space-md);
}

.hero-subheadline {
  color: var(--color-cocoa);
  max-width: 30rem;
  margin-bottom: var(--space-md);
}

.hero-description {
  color: var(--color-cocoa);
  max-width: 28rem;
  margin-bottom: var(--space-md);
}

/* CTA group */
.cta-group {
  max-width: 31rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row input {
  flex: 1;
  height: 48px;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 300;
  color: var(--color-ink);
  background: var(--color-ivory);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.form-row input::placeholder {
  color: var(--color-taupe);
}

.form-row input:focus {
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px rgba(185, 136, 104, 0.15);
}

.form-note {
  margin-top: 12px;
}

.form-error {
  margin-top: 12px;
  color: var(--color-error);
}

.form-success {
  margin-top: var(--space-sm);
  font-family: var(--font-heading);
  font-size: var(--text-h4);
  font-weight: 400;
  color: var(--color-success);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-height: 44px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: var(--text-button);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  border-radius: var(--radius-pill);
  transition:
    background var(--duration-hover) ease,
    border-color var(--duration-hover) ease,
    transform var(--duration-hover) ease;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

.btn-primary {
  border: none;
  background: var(--color-btn-primary);
  color: var(--color-inverse);
}

.btn-primary:hover {
  background: var(--color-btn-primary-hover);
  transform: scale(1.02);
}

.btn-secondary {
  border: 1px solid var(--color-btn-outline-border);
  background: transparent;
  color: var(--color-ink);
}

.btn-secondary:hover {
  background: var(--color-btn-outline-hover-bg);
  border-color: var(--color-clay);
}

.btn-arrow {
  line-height: 1;
  opacity: 0.8;
  transition: transform var(--duration-hover) ease;
}

.btn-secondary:hover .btn-arrow {
  transform: translateX(3px);
}

.cta-secondary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border-divider);
}

.cta-divider {
  color: var(--color-taupe);
}

/* Hero image collage */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.visual-composition {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 5.2;
}

.visual-backdrop {
  position: absolute;
  inset: 4% -8% -2% 2%;
  background: radial-gradient(
    ellipse 85% 75% at 55% 48%,
    var(--color-sand) 0%,
    var(--color-oat) 55%,
    transparent 78%
  );
  border-radius: 50% 48% 52% 46% / 46% 54% 46% 54%;
  z-index: 0;
}

.visual-card {
  position: absolute;
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-sand);
  box-shadow: var(--shadow-soft);
  will-change: transform;
  transition: transform 420ms ease, box-shadow 420ms ease;
}

.visual-card--large {
  top: 0;
  left: 0;
  width: 74%;
  height: 62%;
  z-index: 2;
  animation: float-large 8s ease-in-out infinite;
}

.visual-card--small {
  width: 47%;
  height: 37%;
  z-index: 3;
}

.visual-card--left {
  bottom: 0;
  left: 0;
  animation: float-left 9s ease-in-out infinite;
  animation-delay: 0.4s;
}

.visual-card--right {
  bottom: 6%;
  right: -2%;
  animation: float-right 9.5s ease-in-out infinite;
  animation-delay: 0.8s;
}

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

@keyframes float-left {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

@keyframes float-right {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@media (hover: hover) {
  .visual-card:hover {
    box-shadow: 0 14px 34px rgba(58, 44, 32, 0.10);
  }

  .visual-card:hover .visual-img {
    transform: scale(1.02);
  }
}

.visual-media {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Gradient fallbacks until product images are added */
.visual-media--gift {
  background: linear-gradient(
    160deg,
    var(--color-sand) 0%,
    var(--color-muted-sand) 50%,
    var(--color-muted-clay) 100%
  );
}

.visual-media--melts {
  background: linear-gradient(
    150deg,
    var(--color-blush-wash) 0%,
    var(--color-muted-sand) 55%,
    var(--color-terracotta-blush) 100%
  );
}

.visual-media--favor {
  background: linear-gradient(
    140deg,
    var(--color-muted-sand) 0%,
    var(--color-muted-clay) 48%,
    var(--color-muted-cocoa) 100%
  );
}

.visual-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: none;
  transition: transform 500ms ease;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.visual-img.is-hidden {
  visibility: hidden;
}

.chip {
  position: absolute;
  z-index: 4;
  bottom: 0.875rem;
  left: 0.875rem;
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-cocoa);
  background: rgba(251, 246, 239, 0.92);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(4px);
}

.chip--top {
  bottom: auto;
  top: 0.875rem;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
  padding-block: 48px 64px;
}

.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px;
  min-height: 220px;
  background: var(--color-ivory);
  border: 1px solid rgba(185, 136, 104, 0.22);
  border-radius: var(--radius-md);
  transition: transform var(--duration-card) ease-out;
}

.feature-card:hover {
  transform: translateY(-2px);
}

.feature-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.feature-number {
  flex-shrink: 0;
}

.feature-line {
  width: 32px;
  height: 1px;
  background: var(--color-border-soft);
  flex-shrink: 0;
}

.feature-card h2 {
  margin-bottom: var(--space-xs);
}

.feature-card p {
  color: var(--color-cocoa);
  max-width: 26ch;
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  background: var(--color-oat);
  border-top: 1px solid var(--color-border-divider);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding-block: var(--space-lg);
  text-align: center;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
}

/* Responsive */
@media (min-width: 640px) {
  .form-row {
    flex-direction: row;
    align-items: stretch;
  }

  .btn-primary {
    flex-shrink: 0;
  }

  .features {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }

  .feature-card {
    padding: 44px;
    min-height: 248px;
  }
}

@media (min-width: 768px) {
  .logo {
    width: 204px;
  }

  .cta-secondary {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-md);
  }
}

@media (min-width: 1024px) {
  .hero {
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1fr);
    gap: clamp(48px, 7vw, 110px);
    align-items: center;
    padding-block: 72px 96px;
    min-height: calc(100dvh - var(--header-height-desktop) - 320px);
  }

  .hero-visual {
    justify-content: flex-end;
  }

  .visual-composition {
    max-width: 460px;
  }

  .features {
    padding-block: 72px 96px;
  }
}

@media (min-width: 1280px) {
  .visual-composition {
    max-width: 480px;
  }
}

@media (max-width: 767px) {
  .site-header {
    height: 72px;
    padding-bottom: 18px;
  }

  .hero {
    padding-top: var(--space-md);
  }

  .visual-composition {
    max-width: 340px;
    margin-inline: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .visual-card {
    animation: none !important;
    transition: none !important;
    will-change: auto;
  }

  .visual-img {
    transition: none !important;
    transform: none !important;
  }
}

/* Logo intro */
.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: var(--color-ivory);
  pointer-events: none;
}

.intro-screen.intro-ready {
  animation: intro-overlay-out 5200ms cubic-bezier(0.33, 0, 0.1, 1) forwards;
}

.intro-logo-draw {
  width: 200px;
  max-width: 58vw;
  color: var(--color-ink);
  opacity: 0;
  transform: scale(0.985);
}

.intro-screen.intro-ready .intro-logo-draw {
  animation: intro-logo-appear 900ms cubic-bezier(0.22, 1, 0.36, 1) 120ms forwards;
}

.intro-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.intro-logo-path {
  fill: transparent;
  fill-opacity: 0;
  stroke: var(--color-ink);
  stroke-width: 0.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: var(--path-length, 2000);
  stroke-dashoffset: var(--path-length, 2000);
}

.intro-screen.intro-ready .intro-logo-path {
  animation:
    draw-logo var(--draw-duration, 2400ms) cubic-bezier(0.22, 1, 0.36, 1) var(--draw-delay, 280ms) forwards,
    fill-logo 1100ms cubic-bezier(0.33, 0, 0.2, 1) var(--fill-delay, 2400ms) forwards,
    fade-stroke 900ms ease var(--fill-delay, 2400ms) forwards;
}

.page-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  opacity: 0;
  transform: translateY(6px);
}

.page-content.intro-ready {
  animation: page-reveal 1200ms cubic-bezier(0.22, 1, 0.36, 1) 4200ms forwards;
}

@keyframes intro-logo-appear {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes draw-logo {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fill-logo {
  to {
    fill: var(--color-ink);
    fill-opacity: 1;
  }
}

@keyframes fade-stroke {
  to {
    stroke-opacity: 0;
  }
}

@keyframes intro-overlay-out {
  0% {
    opacity: 1;
    visibility: visible;
  }

  72% {
    opacity: 1;
    visibility: visible;
  }

  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes page-reveal {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 767px) {
  .intro-logo-draw {
    width: 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-screen {
    display: none;
    animation: none;
  }

  .page-content {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .intro-logo-draw {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .intro-logo-path {
    animation: none !important;
    stroke-dashoffset: 0;
    stroke-opacity: 0;
    fill: var(--color-ink);
    fill-opacity: 1;
  }
}
