/* ==========================================================================
   Harry's Direct — Design System
   Palette: deep navy, rich charcoal, warm ivory, muted bronze accent.
   Type: 'Fraunces' (display/editorial) + 'Public Sans' (interface/body).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400&family=Public+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Color */
  --color-navy: #14213D;
  --color-navy-deep: #0C1526;
  --color-charcoal: #23252B;
  --color-ivory: #F6F3EC;
  --color-surface: #FFFFFF;
  --color-bronze: #A9812C;
  --color-bronze-soft: #C9A55C;
  --color-burgundy: #6E2B34;
  --color-text: #1C1D21;
  --color-text-muted: #5B5E68;
  --color-border: #E2DFD5;
  --color-success: #2E6B4F;
  --color-warning: #9A6A1E;
  --color-error: #A5333A;

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --fs-hero: clamp(2rem, 4vw, 3.5rem);
  --fs-h1: clamp(2.1rem, 3.5vw, 3rem);
  --fs-h2: clamp(1.65rem, 2.6vw, 2.25rem);
  --fs-h3: clamp(1.3rem, 1.8vw, 1.6rem);
  --fs-h4: 1.15rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-caption: 0.75rem;

  /* Layout */
  --container-max: 1280px;
  --radius-sm: 3px;
  --radius-md: 6px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  --shadow-card: 0 1px 2px rgba(20, 33, 61, 0.06), 0 8px 24px rgba(20, 33, 61, 0.06);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--color-text);
  background: var(--color-ivory);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  margin: 0 0 var(--space-2);
  color: var(--color-navy-deep);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

/* Hero headline — colored to match the logo's red/blue.
   Note: the logo's blue is a dark navy, which would be nearly invisible
   against this hero's dark navy background — so this uses a brighter,
   lighter blue that still reads clearly as "blue" while staying legible.
   The red is close to the logo's actual red since red contrasts fine
   against dark navy either way. */
.hero-line-blue { color: #5B8DEF; }
.hero-line-red { color: #E63946; }

/* Full-bleed hero: a single background photo spans the entire section.
   Two stacked copies of the same image create the effect: .hero-bg is the
   sharp version underneath; .hero-bg-blur sits on top with a CSS blur
   filter applied, then a mask fades that blurred copy out from left to
   right — so the LEFT side (behind the text) shows the blurred version,
   and by the RIGHT side the mask has faded it to fully transparent,
   letting the sharp .hero-bg show through underneath (the storefront,
   clearly visible). A dark gradient overlay on top adds extra contrast
   for the text regardless of how bright the photo is. */
.hero-fullbleed {
  position: relative;
  overflow: hidden;
  color: var(--color-ivory);
  min-height: 620px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.hero-bg, .hero-bg-blur {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.hero-bg-blur {
  filter: blur(22px);
  transform: scale(1.12); /* avoids a faint sharp edge from the blur sampling past the element's own bounds */
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 48%, transparent 78%);
  mask-image: linear-gradient(to right, #000 0%, #000 48%, transparent 78%);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(12,21,38,0.86) 0%, rgba(12,21,38,0.62) 42%, rgba(12,21,38,0.15) 68%, rgba(12,21,38,0) 85%);
}
.hero-fullbleed .hero-content {
  position: relative;
  z-index: 2;
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
  padding-left: clamp(1.5rem, 6vw, 5rem);
  max-width: 720px;
  margin: 0; /* higher specificity than .container's margin:0 auto (which was centering this) so it wins regardless of source order in the file */
}

@media (max-width: 900px) {
  .hero-fullbleed { min-height: 560px; }
  /* Narrower viewports leave less room for the clear "storefront" side, so
     the blurred/dark zone is widened to keep text comfortably legible. */
  .hero-bg-blur {
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 62%, transparent 88%);
    mask-image: linear-gradient(to right, #000 0%, #000 62%, transparent 88%);
  }
  .hero-overlay {
    background: linear-gradient(to right, rgba(12,21,38,0.88) 0%, rgba(12,21,38,0.68) 55%, rgba(12,21,38,0.2) 80%, rgba(12,21,38,0) 92%);
  }
  .hero-fullbleed .hero-content { max-width: 78%; }
}

@media (max-width: 560px) {
  .hero-fullbleed { min-height: 520px; }
  /* On phones the storefront needs to stay visible but text needs nearly
     the full width to wrap comfortably — push the clear zone further
     right and let text occupy most of the viewport. */
  .hero-bg-blur {
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 78%, transparent 96%);
    mask-image: linear-gradient(to right, #000 0%, #000 78%, transparent 96%);
  }
  .hero-overlay {
    background: linear-gradient(to right, rgba(12,21,38,0.9) 0%, rgba(12,21,38,0.78) 70%, rgba(12,21,38,0.35) 90%, rgba(12,21,38,0.1) 100%);
  }
  .hero-fullbleed .hero-content { max-width: 92%; }
}
h4 { font-size: var(--fs-h4); font-family: var(--font-body); font-weight: 600; }

p { margin: 0 0 var(--space-2); max-width: 62ch; color: var(--color-text); }
p.lede { font-size: 1.15rem; color: var(--color-text-muted); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

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

.section {
  padding: var(--space-6) 0;
}
.section--tight { padding: var(--space-4) 0; }
.section--navy { background: var(--color-navy-deep); color: var(--color-ivory); }
.section--navy h1, .section--navy h2, .section--navy h3 { color: var(--color-ivory); }
.section--navy p { color: rgba(246,243,236,0.78); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.section-head p { margin: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  will-change: transform;
}
.btn-primary { background: var(--color-navy-deep); color: var(--color-ivory); }
.btn-primary:hover { background: var(--color-navy); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--color-navy-deep); border-color: var(--color-navy-deep); }
.btn-outline:hover { background: var(--color-navy-deep); color: var(--color-ivory); transform: translateY(-2px); }
.btn-bronze { background: var(--color-bronze); color: #fff; }
.btn-bronze:hover { background: #8E6C24; transform: translateY(-2px); }
.btn-ghost-light { background: transparent; color: var(--color-ivory); border-color: rgba(246,243,236,0.4); }
.btn-ghost-light:hover { background: rgba(246,243,236,0.1); border-color: var(--color-ivory); }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.85rem; }
.btn-block { width: 100%; justify-content: center; }

/* Badges */
.badge {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  font-size: var(--fs-caption);
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--color-navy-deep);
  color: var(--color-ivory);
}
.badge-sale { background: var(--color-burgundy); }
.badge-new { background: var(--color-bronze); }
.badge-limited { background: var(--color-warning); }
.badge-soldout { background: var(--color-text-muted); }

/* Forms */
label { display: block; font-weight: 600; font-size: var(--fs-small); margin-bottom: 0.35rem; color: var(--color-navy-deep); }
input, textarea, select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text);
}
input:focus, textarea:focus, select:focus { border-color: var(--color-bronze); }
.field { margin-bottom: var(--space-3); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

.alert { padding: 0.9rem 1.2rem; border-radius: var(--radius-sm); margin-bottom: var(--space-3); font-size: 0.95rem; }
.alert-error { background: #FBEAEA; color: var(--color-error); border: 1px solid #F0C7C9; }
.alert-success { background: #E9F3EC; color: var(--color-success); border: 1px solid #C4E0CE; }

/* Grid helpers */
.grid { display: grid; gap: var(--space-3); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Reveal-on-scroll (single orchestrated pattern, not per-card spam) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--color-navy-deep); color: #fff;
  padding: 0.75rem 1rem; z-index: 999;
}
.skip-link:focus { left: var(--space-2); top: var(--space-2); }
