/* ---------------------------------------------
   ALMARA — one-page site
--------------------------------------------- */

@font-face {
  font-family: 'TAN Pearl';
  src: url('assets/fonts/TAN-Pearl-Regular.woff2') format('woff2'),
       url('assets/fonts/TAN-Pearl-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #0a0a0a;
  --off-white: #f2efeb;
  --gray: #6b6b6b;
  --line: #c9c5bd;
  --font-logo: 'TAN Pearl', 'Bodoni Moda', 'Didot', serif;
  --font-cta: 'Lora', 'Bodoni Moda', serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-cta);
  color: var(--black);
  background: var(--off-white);
}

/* ---------- HERO ---------- */

.hero {
  position: relative;
  /* Dynamic viewport height continuously tracks the browser's actual
     visible area as its toolbars expand/collapse, so this section
     (and its full-bleed mobile photo) always exactly fills the
     screen — no gap when chrome is showing, no peek of the next
     section when it collapses. Fallback to 100vh for older browsers. */
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  background: var(--black);
  overflow: hidden;
}

/* Mobile: full-bleed photo behind the logo, faded to black at the
   bottom. Desktop: split layout below, photo as a left column instead. */
.hero-media {
  display: none;
}

@media (max-width: 768px) {
  .hero-media {
    display: block;
    position: absolute;
    inset: 0;
    background-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.35) 0%,
        rgba(0, 0, 0, 0.15) 40%,
        rgba(0, 0, 0, 0.55) 65%,
        rgba(0, 0, 0, 0.92) 82%,
        #000 94%
      ),
      url("assets/images/hero-rack.jpg");
    background-repeat: no-repeat;
    background-size: cover, cover;
    background-position: center, center 28%;
    filter: grayscale(1) contrast(1.08) brightness(0.85);
  }
}

@media (min-width: 769px) {
  .hero {
    display: flex;
  }

  .hero-media {
    display: block;
    flex: 0 0 39%;
    background-image: url("assets/images/hero-rack.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center 28%;
    filter: grayscale(1) contrast(1.08) brightness(0.9);
  }

  /* Positioned only at desktop so .logo/.cta (absolutely positioned)
     center within this right-hand column instead of the full hero
     width. At mobile this stays unpositioned and they fall through
     to .hero itself, preserving the original full-bleed layout. */
  .hero-content {
    position: relative;
    flex: 1;
  }
}

.logo {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-logo);
  font-weight: 400;
  color: var(--off-white);
  font-size: clamp(3.5rem, 12vw, 7.5rem);
  letter-spacing: 0.02em;
  margin: 0;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.cta {
  position: absolute;
  bottom: 7%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-cta);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 400;
  background: none;
  color: var(--off-white);
  border: none;
  padding: 0.5rem 1.4rem;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  white-space: nowrap;
  width: max-content;
  transition: color 0.35s ease 0.05s;
}

.cta::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--off-white);
  z-index: -1;
  transition: height 0.35s ease;
}

.cta:hover {
  color: var(--black);
}

.cta:hover::before,
.cta:focus-visible::before {
  height: 100%;
}

/* ---------- FORM ---------- */

.form-section {
  background: var(--off-white);
  padding: 4rem 1.5rem 6rem;
  font-family: var(--font-cta);
}

.form-media {
  display: none;
}

#customOrderForm {
  width: 100%;
  max-width: 608px;
  margin: 0 auto;
}

.success-message {
  font-family: var(--font-cta);
  font-size: 1rem;
  line-height: 1.6;
  text-align: center;
  margin: 0;
}

/* Desktop/web: split layout — a black panel with the "A" mark on the
   left, form on the right, both filling the viewport height. Mobile
   keeps the single-column layout below the photo hero. */
@media (min-width: 769px) {
  .form-section {
    display: flex;
    align-items: stretch;
    min-height: 100vh;
    padding: 0;
  }

  .form-media {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 39%;
    background: var(--black);
  }

  .form-media::before {
    content: "A";
    font-family: var(--font-logo);
    font-weight: 400;
    color: var(--off-white);
    font-size: clamp(7rem, 15vw, 13rem);
    line-height: 1;
  }

  .form-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 6rem;
  }

  #customOrderForm {
    max-width: 496px;
    margin: 0 auto;
  }

  .success-message {
    max-width: 620px;
  }
}

.field-group {
  margin-bottom: 2rem;
}

.group-label {
  font-family: var(--font-cta);
  font-size: 1.04rem;
  font-weight: 400;
  margin: 0 0 0.48rem;
}

label.group-label {
  display: block;
}

.req {
  font-family: var(--font-cta);
  font-size: 0.6rem;
  font-weight: 400;
  color: var(--gray);
}

.row {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.field {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
}

.field label {
  font-family: var(--font-cta);
  font-size: 1.04rem;
  font-weight: 400;
  margin-bottom: 0.48rem;
}

.field .req {
  margin-left: 0.3rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  font-family: var(--font-cta);
  font-size: 0.72rem;
  border: none;
  border-bottom: 1px solid var(--black);
  background: transparent;
  padding: 0.4rem 0.08rem;
  outline: none;
  color: var(--black);
  width: 100%;
}

textarea {
  resize: none;
  min-height: 0;
}

input:focus,
textarea:focus {
  border-bottom-width: 2px;
}

.submit-wrap {
  text-align: center;
  margin-top: 2.4rem;
}

.form-status {
  min-height: 1.2rem;
  font-family: var(--font-cta);
  font-size: 0.72rem;
  line-height: 1.5;
  margin: 1rem 0 0;
}

.form-status.error {
  color: #b3261e;
}

.send-btn {
  position: relative;
  display: inline-block;
  font-family: var(--font-cta);
  font-size: clamp(0.88rem, 1.76vw, 1.08rem);
  font-weight: 400;
  background: none;
  border: none;
  color: var(--black);
  padding: 0.32rem 1.44rem;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  white-space: nowrap;
  width: max-content;
  transition: color 0.35s ease 0.05s;
}

.send-btn::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--black);
  z-index: -1;
  transition: height 0.35s ease;
}

.send-btn:hover,
.send-btn:focus-visible {
  color: var(--off-white);
}

.send-btn:hover::before,
.send-btn:focus-visible::before {
  height: 100%;
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mobile: the form itself runs at 85% width (15% smaller), centered
   both horizontally and vertically in the section. */
@media (max-width: 768px) {
  .form-section {
    padding: 3rem 1.5rem 5rem;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  #customOrderForm {
    max-width: 85%;
    margin: 0 auto;
  }

  .field-group {
    margin-bottom: 1.36rem;
  }

  .group-label,
  .field label {
    font-size: 0.72rem;
    margin-bottom: 0.34rem;
  }

  .req {
    font-size: 0.43rem;
  }

  .row {
    gap: 1.02rem;
  }

  .field {
    flex-basis: 110px;
  }

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea {
    font-size: 0.51rem;
    padding: 0.27rem 0.05rem;
  }

  .submit-wrap {
    margin-top: 1.62rem;
  }

  .form-status {
    font-size: 0.51rem;
    margin-top: 0.68rem;
  }

  .send-btn {
    font-size: clamp(0.61rem, 2.98vw, 0.75rem);
    padding: 0.22rem 0.98rem;
  }
}
