/* ==========================================================================
   Bloom. Luxury Floral Boutique - Main Stylesheet
   Imports & Base Page Layout
   ========================================================================== */

@import url('./variables.css');
@import url('./reset.css');
@import url('./navbar.css');
@import url('./sections.css');
@import url('./categories.css');
@import url('./art.css');
@import url('./steps.css');
@import url('./moment.css');
@import url('./footer.css');
@import url('./cursor.css');

/* ==========================================================================
   Base & Typography
   ========================================================================== */
body {
  background-color: var(--color-bg-base);
  color: var(--color-text-body);
}

.font-serif {
  font-family: var(--font-serif);
}

.font-sans {
  font-family: var(--font-sans);
}

/* ==========================================================================
   Hero Stage & Canvas Sequence Styles
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: var(--navbar-height);
  /* Leave room for the next section's wave, which overlaps the hero bottom */
  padding-bottom: calc(2rem + var(--wave-height) * 0.55);
  background-color: var(--color-bg-base);
  overflow: hidden;
}

/* Hero Live Canvas Wrap */
.hero-canvas-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Initial load state is handled by the welcome screen (preloader.css)
   and hero.js — content is never hidden by CSS alone, so a failed
   script can't leave the page blank. */

.hero-container {
  max-width: var(--container-max-width);
  width: 100%;
  flex: 1;
  margin: 0 auto;
  padding: 1.5rem var(--container-padding) 1rem;
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  align-items: stretch;
  gap: 3rem;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

/* Hero Content (Left) - Stretches from top to bottom, filling the page */
.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  /* Inset from the logo line so the copy doesn't sit directly under it */
  --hero-inset: clamp(1.5rem, 5vw, 6rem);
  max-width: calc(660px + var(--hero-inset));
  padding: 1rem 0 1rem var(--hero-inset);
}

.hero-main-block {
  display: flex;
  flex-direction: column;
  gap: 1.85rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-badge-accent {
  color: var(--color-badge-fresh);
}

.hero-badge-dot {
  color: #9E948C;
  font-size: 0.85rem;
  line-height: 1;
}

.hero-badge-muted {
  color: var(--color-badge-quality);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3.2rem, 5.8vw, 5.4rem);
  line-height: 1.04;
  color: var(--color-hero-heading);
  font-weight: 600;
  letter-spacing: -0.025em;
  word-break: break-word;
}

.hero-title-line {
  display: block;
}

.hero-title-script {
  display: block;
  font-family: var(--font-script);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(4.2rem, 8.2vw, 7rem);
  color: var(--color-coral-script);
  margin-top: 0.2rem;
  margin-left: -0.2rem;
  letter-spacing: normal;
  line-height: 1.1;
}

.hero-description {
  font-size: clamp(1.0625rem, 1.35vw, 1.25rem);
  color: #423A35;
  line-height: 1.75;
  max-width: 550px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.hero-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  padding: 1.2rem 2.85rem;
  border-radius: var(--radius-full);
  background-color: var(--color-primary);
  color: var(--color-text-white);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: var(--weight-medium);
  box-shadow: 0 8px 24px rgba(26, 36, 32, 0.22);
  transition: transform var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.hero-btn-primary:hover {
  background-color: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-button-hover);
}

.hero-btn-primary svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  transition: transform var(--transition-fast);
}

.hero-btn-primary:hover svg {
  transform: translateX(4px);
}

/* Trust Badges - Anchored at the bottom in a single horizontal row */
.hero-trust-grid {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(49, 46, 43, 0.16);
}

.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.875rem;
  font-weight: var(--weight-medium);
  color: #423A35;
  white-space: nowrap;
}

.hero-trust-icon {
  width: 22px;
  height: 22px;
  color: #423A35;
  opacity: 0.95;
  flex-shrink: 0;
}

/* Hero Visual Stage Spacer (Right Column on Desktop) */
.hero-visual-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 560px;
  pointer-events: none;
}

@media (max-width: 900px) {
  .hero-visual-stage {
    display: none;
    min-height: 0;
  }
}

/* Vertical Section Indicator (Right Edge) */
.hero-section-indicator {
  position: absolute;
  right: var(--container-padding);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  z-index: 5;
}

.section-indicator-item {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  text-decoration: none;
  font-size: 0.8125rem;
  color: #7A7069;
  transition: color var(--transition-fast);
  position: relative;
}

.section-indicator-item:hover,
.section-indicator-item.is-active {
  color: #1F2723;
}

.section-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(70, 60, 50, 0.4);
  background-color: transparent;
  transition: transform var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);
}

.section-indicator-item.is-active .section-indicator-dot {
  background-color: #1F2723;
  border-color: #1F2723;
  transform: scale(1.25);
}

.section-indicator-item::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 16px;
  width: 1px;
  height: 2.2rem;
  background-color: rgba(70, 60, 50, 0.22);
}

.section-indicator-item:last-child::before {
  display: none;
}

.section-indicator-num {
  font-size: 0.75rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.05em;
  color: inherit;
}

.section-indicator-name {
  font-family: var(--font-sans);
  color: inherit;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1366px) {
  .hero-section-indicator {
    display: none;
  }
}

@media (max-width: 900px) {
  .hero-section {
    align-items: flex-start;
    padding-top: calc(var(--navbar-height) + 1rem);
    min-height: auto;
    height: auto;
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    padding-bottom: 2.5rem;
  }
  
  .hero-content {
    align-items: center;
    max-width: 100%;
    gap: 2.5rem;
    padding-left: 0; /* centred layout on tablets/phones */
  }

  .hero-main-block {
    align-items: center;
  }
  
  .hero-description {
    max-width: 100%;
  }
  
  .hero-trust-grid {
    justify-content: center;
    flex-wrap: wrap;
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .hero-cta-group {
    width: 100%;
    justify-content: center;
  }

  .hero-btn-primary {
    width: 100%;
    justify-content: center;
  }

  .hero-trust-grid {
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
  }
}

/* ==========================================================================
   Hero — responsive layouts
   ========================================================================== */

/* Medium screens: keep two columns, but make room so copy never touches
   the bouquet (hero.js also pushes the bouquet further right here). */
@media (min-width: 901px) and (max-width: 1280px) {
  .hero-content {
    max-width: min(50vw, calc(660px + var(--hero-inset)));
  }

  .hero-title {
    font-size: clamp(2.6rem, 4.7vw, 4.1rem);
  }

  .hero-title-script {
    font-size: clamp(3.1rem, 6vw, 5rem);
  }
}

/* Phones & tablets (portrait): copy on top, bouquet below it */
@media (max-width: 900px) {
  .hero-section {
    min-height: 100vh;
    min-height: 100svh;
    padding-top: calc(var(--navbar-height) + 0.5rem);
    padding-bottom: 0;
  }

  .hero-canvas-wrap {
    top: auto;
    bottom: 0;
    height: 54%;
  }

  /* fade the photo's top edge into the cream behind the copy */
  .hero-canvas-wrap::after {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 40%;
    background: linear-gradient(to bottom, var(--color-bg-base) 0%, rgba(250, 247, 242, 0) 100%);
    pointer-events: none;
  }

  .hero-container {
    flex: 0 0 auto;
    padding-bottom: 0;
  }

  .hero-content {
    gap: 0;
    padding-top: 0.5rem;
  }

  .hero-main-block {
    gap: 1.1rem;
  }

  .hero-title {
    font-size: clamp(2.4rem, 8.5vw, 3.75rem);
  }

  .hero-title-script {
    font-size: clamp(2.9rem, 11vw, 4.75rem);
    margin-left: 0;
  }

  .hero-description {
    font-size: 1rem;
    max-width: 34ch;
  }

  /* the same promises appear in section 03's feature list */
  .hero-trust-grid {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-btn-primary {
    width: auto;
    padding: 1rem 2rem;
  }

  .hero-badge {
    gap: 0.45rem;
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    white-space: nowrap;
  }
}

/* Short portrait phones (e.g. 320x568, 360x640): give the copy more room */
@media (max-width: 900px) and (orientation: portrait) and (max-height: 700px) {
  .hero-canvas-wrap {
    height: 44%;
  }

  .hero-main-block {
    gap: 0.8rem;
  }

  .hero-title {
    font-size: clamp(2.1rem, 8vw, 2.6rem);
  }

  .hero-title-script {
    font-size: clamp(2.5rem, 10vw, 3.2rem);
  }

  .hero-description {
    font-size: 0.9375rem;
    line-height: 1.55;
  }
}

/* Phones in landscape: short screens get the side-by-side layout back */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 520px) {
  :root {
    --navbar-height: 60px;
    --navbar-height-scrolled: 54px;
  }

  .navbar__logo-img,
  .is-scrolled .navbar__logo-img {
    height: 34px;
  }

  .hero-description {
    display: none;
  }

  .hero-section {
    padding-top: calc(var(--navbar-height) + 0.25rem);
  }

  .hero-canvas-wrap {
    top: 0;
    height: 100%;
  }

  .hero-canvas-wrap::after {
    inset: 0 auto 0 0;
    width: 60%;
    height: auto;
    background: linear-gradient(to right, rgba(250, 247, 242, 0.92) 0%, rgba(250, 247, 242, 0.6) 55%, rgba(250, 247, 242, 0) 100%);
  }

  .hero-container {
    text-align: left;
  }

  .hero-content,
  .hero-main-block {
    align-items: flex-start;
  }

  .hero-content {
    max-width: 55%;
    padding-top: 0;
  }

  .hero-main-block {
    gap: 0.6rem;
  }

  .hero-badge {
    display: none;
  }

  .hero-title {
    font-size: clamp(1.7rem, 4.6vw, 2.4rem);
  }

  .hero-title-script {
    font-size: clamp(2rem, 5.6vw, 2.9rem);
  }

  .hero-description {
    font-size: 0.875rem;
    line-height: 1.55;
  }

  .hero-btn-primary {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
  }
}
