/* ===== Fonts ===== */
/* ITC Avant Garde Gothic Std Bold: add .woff2 to /fonts/ and uncomment below, or use fallback */
@font-face {
  font-family: 'ITC Avant Garde Gothic Std';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local('ITC Avant Garde Gothic Std Bold'),
       local('AvantGarde-Bold'),
       url('/fonts/ITCAvantGardeStd-Bold.woff2') format('woff2'),
       url('/fonts/ITCAvantGardeStd-Bold.woff') format('woff');
}
/* Fallback when local font not present — use a similar geometric sans */
@font-face {
  font-family: 'ITC Avant Garde Gothic Std';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local('Poppins Bold'), local('Raleway Bold');
}

:root {
  --font-hello: 'ITC Avant Garde Gothic Std', 'Poppins', 'Raleway', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --color-red: #dc143c;
  --color-white: #fff;
  --color-light: #e8e8e8;
  --color-rect-fill: #b0b0b0;
  --color-muted: #808080;
  --color-dark: #1a1a1a;
  --color-black: #000;
  --border-btn: 1px solid #444;
  --radius-btn: 999px;
  /* Mobile spacing (exact match) */
  --space-rect-line: 12px;
  --space-line-line: 6px;
  --space-line-btn: 20px;
  --space-btn-hello: 28px;
  --space-hello-name: 8px;
  --space-desc-letters: 48px;
  --space-letter-letter: 24px;
  --space-letters-btn: 40px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 24px;
  color: var(--color-white);
  background: var(--color-black);
  -webkit-font-smoothing: antialiased;
}

/* ===== Hero: mobile = above-fold 100vh then scroll content; desktop = full height ===== */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0 20px 24px 20px;
  position: relative;
  overflow: visible;
}

/* Mobile: background only covers above-the-fold (first viewport), not scroll content */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  height: 100dvh;
  z-index: 0;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  background-color: #2a2a2a;
  background-position: center;
  background-repeat: no-repeat;
  /* Image height = container (above-fold viewport); sides may crop */
  background-size: auto 100%;
}

@media (min-width: 900px) {
  .hero-bg {
    inset: 0;
    height: auto;
  }
}

/* Layer 2: gradient overlay on top of image */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 50vh);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 90rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 100vh minmax(0, auto);
  align-items: stretch;
  min-height: 0;
  padding: 0 20px;
}

/* Mobile: above-the-fold section fills first viewport; h1, p, button at bottom with 50px */
.hero-above-fold {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  min-height: 100vh;
  padding: 24px 0 0 0;
}

.hero-above-fold-bottom {
  margin-top: auto;
  padding-bottom: 50px;
}

.hero-left {
  grid-column: 1;
  grid-row: 2;
  padding: 0;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  height: 1500px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ===== Mobile: graphic + Line 1/2 + first button; scan frame over top flower (right), results under ===== */
.graphic-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  align-self: flex-end;
  margin-left: auto;
  margin-top: 12vh;
}

.rectangle-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: min(288px, 86vw);
}

/* Mobile: scan frame — portrait rectangle, no fill, custom large dashed border */
.rect-circle-area {
  position: relative;
  width: min(288px, 86vw);
  aspect-ratio: 3 / 4;
  max-height: min(480px, 78vh);
  padding: 0;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 6px;
}

/* Custom dashed border: large dashes, more gap, 2px thick */
.rect-circle-area::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.9) 0, rgba(255,255,255,0.9) 28px, transparent 28px, transparent 48px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.9) 0, rgba(255,255,255,0.9) 28px, transparent 28px, transparent 48px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.9) 0, rgba(255,255,255,0.9) 28px, transparent 28px, transparent 48px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.9) 0, rgba(255,255,255,0.9) 28px, transparent 28px, transparent 48px);
  background-size: 100% 2px, 100% 2px, 2px 100%, 2px 100%;
  background-position: 0 0, 0 100%, 0 0, 100% 0;
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
}

/* Frosted “scan results” block under the rectangle (mobile) */
.scan-results {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

.scan-results .line1 { margin: 0; }
.scan-results .line2 { margin: 4px 0 0; }

/* Line 1 / Line 2 — Inter Light 24, left-aligned on mobile */
.line1 {
  margin: var(--space-rect-line) 0 0;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 24px;
  line-height: 1.35;
  color: var(--color-white);
  text-align: left;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.line2 {
  margin: var(--space-line-line) 0 0;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 24px;
  line-height: 1.35;
  color: var(--color-white);
  text-align: left;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Button — mobile: white icon + white text, light grey border, darker grey background */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 24px;
  color: var(--color-white);
  background: rgba(100, 100, 100, 0.7);
  border: 1px solid rgba(220, 220, 220, 0.9);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn:hover { opacity: 0.9; }

.btn-icon {
  width: 22px;
  height: 22px;
  color: inherit;
}

/* Mobile: show "Take photo"; desktop shows "Upload photo" and upload icon */
.btn-icon-upload {
  display: none;
}

.btn-label-desktop {
  display: none;
}

/* First button: left-aligned on mobile, distinct spacing below Line 2 */
.btn-top {
  margin-top: var(--space-line-btn);
  align-self: flex-start;
}

@media (min-width: 900px) {
  .btn-top { display: none; }
}


/* Greeting block: left-aligned, same horizontal padding as content */
.greeting {
  text-align: left;
  margin-top: var(--space-btn-hello);
  padding-left: 0;
}

/* Hello — ITC Avant Garde Gothic Std Bold 64, white, left-aligned */
.hello {
  margin: 0;
  font-family: var(--font-hello);
  font-weight: 700;
  font-size: clamp(2.25rem, 11vw, 64px);
  line-height: 1.1;
  color: var(--color-white);
  text-align: left;
}

/* My name is here. — Inter Regular 24, white, left-aligned, exact spacing below Hello */
.name-line {
  margin: var(--space-hello-name) 0 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.4;
  color: var(--color-white);
  text-align: left;
}

/* ===== Scroll content: fills hero-left height on mobile; space between ===== */
.scroll-content {
  position: relative;
  z-index: 1;
  padding: 56px 20px 48px;
  max-width: 90rem;
  margin: 0 auto;
  background: var(--color-black);
  flex: 1;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Description — Inter Extra Light 24, left-aligned, significant gap above (from My name is here.) */
.description {
  margin: 0 0 0 30px;
  font-family: var(--font-body);
  font-weight: 200;
  font-size: 24px;
  line-height: 1.5;
  color: var(--color-white);
  max-width: 100%;
  padding: 0;
}

.description-desktop {
  display: none;
}

/* First letter: mobile "Snap.", desktop "Upload." */
.letter-desktop {
  display: none;
}

/* A, B, C — Inter Extra Light 48, centered, substantial vertical spacing */
.letters-list {
  list-style: none;
  margin: var(--space-desc-letters) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 700px;
}

.letter {
  font-family: var(--font-body);
  font-weight: 200;
  font-size: 48px;
  line-height: 1.2;
  color: var(--color-white);
  text-align: center;
}

.btn-wrap {
  display: flex;
  justify-content: center;
  margin-top: var(--space-letters-btn);
}

/* ===== Desktop: single viewport — left column (greeting + description + A/B/C + button) + right (graphic); Line 1/2 left-aligned, dark gray; button light gray + upload icon ===== */
@media (min-width: 900px) {
  .page {
    display: block;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .hero {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 38% 1fr;
    grid-template-rows: 1fr;
    padding: 0;
    align-items: stretch;
  }

  .hero-bg {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .hero-bg-image {
    background-size: cover;
    background-position: 67% top;
  }

  .hero-bg::after {
    background: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 50%);
  }

  .hero-content {
    grid-column: 1 / -1;
    grid-row: 1;
    display: grid;
    grid-template-columns: 38% 1fr;
    grid-template-rows: auto 1fr;
    gap: 0;
    max-width: none;
    width: 100%;
    height: 100%;
    padding: 0 48px 40px 48px;
    align-items: stretch;
    justify-items: stretch;
    min-height: 0;
  }

  .hero-above-fold {
    display: contents;
  }

  .hero-above-fold-bottom {
    display: contents;
  }

  .hero-above-fold .graphic-block {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: start;
    justify-self: end;
    padding-top: 6vh;
    margin-right: 480px;
    margin-top: 60px;
  }

  .hero-above-fold .greeting {
    grid-column: 1;
    grid-row: 1;
  }

  .hero-left {
    width: auto;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    height: auto;
  }

  .hero-left {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0;
    min-height: 0;
    height: 100%;
    padding: 0;
    overflow: hidden;
    align-self: stretch;
  }

  .greeting {
    flex-shrink: 0;
    margin-top: 0;
    text-align: left;
  }

  .greeting .hello {
    margin: 0;
    font-size: 64px;
    color: var(--color-white);
    padding-top: 40px;
  }
  .greeting .name-line { margin: 4px 0 0; color: var(--color-white); }

  .scroll-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0;
    padding: 8px 0 0 0;
    margin-top: 0;
    background: transparent;
    width: 100%;
  }

  .description-mobile {
    display: none;
  }

  .description-desktop {
    display: block;
  }

  .letter-mobile { display: none; }
  .letter-desktop { display: inline; }

  .scroll-content .description {
    margin: 0;
    flex-shrink: 0;
    font-size: 24px;
    text-align: left;
  }

  .letters-list {
    flex: 1;
    height: auto;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: flex-start;
    min-height: 0;
    list-style: none;
    gap: 0;
  }

  .letter { font-size: 48px; text-align: left; }

  .scroll-content .btn-wrap {
    margin-top: auto;
    flex-shrink: 0;
    justify-content: flex-start;
  }

  .graphic-block {
    grid-column: 2;
    align-self: center;
    justify-self: center;
    align-items: flex-start;
    text-align: left;
    margin-top: 0;
    margin-left: 0;
  }

  /* Desktop: same as mobile — dashed rectangle + frosted results, larger so flower fits entirely */
  .graphic-block .rectangle-wrap {
    border: none;
    background: transparent;
    width: min(420px, 32vw);
    max-width: 420px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .graphic-block .rect-circle-area {
    width: min(420px, 32vw);
    max-width: 420px;
    aspect-ratio: 3 / 4;
    max-height: min(560px, 75vh);
    padding: 0;
    background: transparent;
    border: none;
    margin-left: 0;
  }

  .graphic-block .scan-results {
    margin-top: 14px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    text-align: left;
    width: 100%;
    box-sizing: border-box;
  }

  .graphic-block .scan-results .line1,
  .graphic-block .scan-results .line2 {
    margin: 0;
  }

  .graphic-block .scan-results .line2 {
    margin-top: 6px;
  }

  .graphic-block .line1,
  .graphic-block .line2 {
    margin: 10px 0 0;
    padding: 0;
    color: var(--color-white);
    text-align: left;
    font-size: 26px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  }

  .graphic-block .line2 { margin-top: 2px; }

  .scroll-content .description,
  .scroll-content .letter {
    color: var(--color-white);
  }

  .letter {
    text-align: left;
  }

  /* Desktop button: light gray background, thin dark gray border, dark gray icon + text, camera icon */
  .scroll-content .btn {
    color: var(--color-dark);
    background: var(--color-light);
    border: 1px solid #666;
  }

  .btn-main .btn-icon-camera { display: none; }
  .btn-main .btn-icon-upload { display: block; }

  .btn-label-mobile { display: none; }
  .btn-label-desktop { display: inline; }
}

/* ===== Mid-size responsive ===== */
@media (min-width: 600px) and (max-width: 899px) {
  .hero-content { padding: 0 28px; }
  .rectangle-wrap {
    width: min(240px, 42vw);
  }
  .hello { font-size: clamp(2.5rem, 7vw, 56px); }
  .scroll-content { padding: 48px 0 48px; }
}

/* Desktop: hero image positioned so flower fits entirely in scan rectangle */
@media (min-width: 900px) {
  .hero-bg-image {
    background-size: cover;
    background-position: 67% top;
  }
}
