@import url('../branding/caldrenna-tokens.css');

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  opacity: 0.8;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 3px;
}

.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 shell ——— */
.site-header {
  padding: 1.75rem 1.25rem 1.25rem;
}

.site-header__logo {
  display: inline-block;
  width: 128px;
  line-height: 0;
}

.site-header__logo img {
  width: 100%;
  height: auto;
}

.site-main {
  display: block;
}

.site-footer {
  padding: 3rem 1.25rem 2.5rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--paper);
  background: var(--slate);
}

.site-footer a {
  color: var(--bronze-light);
}

.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
}

.site-footer__legal {
  margin: 1.25rem 0 0;
  color: color-mix(in srgb, var(--paper) 70%, transparent);
}

/* ——— Hero ——— */
.hero {
  position: relative;
}

.hero__media {
  position: relative;
  width: 100%;
  height: 58vh;
  min-height: 240px;
  max-height: 480px;
  overflow: hidden;
  background: #c4a882;
}

.hero__video,
.hero__fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__video--desktop,
.hero__fallback {
  display: none;
}

@media (min-width: 768px) {
  .hero__media {
    height: auto;
    max-height: none;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .hero__video--mobile {
    display: none;
  }

  .hero__video--desktop {
    display: block;
    object-fit: contain;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__video {
    display: none !important;
  }

  .hero__fallback {
    display: block;
  }
}

.hero__copy {
  padding: 1.75rem 1.25rem 0.5rem;
  max-width: 40rem;
}

.hero__copy h1 {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: var(--weight-heading);
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.hero__copy p {
  margin: 1.25rem 0 0;
  max-width: 34em;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--ink-muted);
}

@media (min-width: 960px) {
  .hero__copy {
    padding: 2.5rem 3.5rem 0.5rem;
    max-width: 44rem;
  }
}

/* ——— Waitlist ——— */
.waitlist {
  padding: 3.5rem 1.25rem 4rem;
  border-top: 1px solid var(--line);
}

.waitlist__inner {
  max-width: 34rem;
}

.waitlist .label {
  display: block;
  margin-bottom: 1rem;
  color: var(--ink-muted);
}

.waitlist p {
  margin: 0 0 1.75rem;
  max-width: 34em;
  color: var(--ink);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
}

.signup {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 28rem;
}

.signup__field {
  flex: 1;
  min-width: 0;
}

.signup__field input {
  width: 100%;
  padding: 0.85rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  appearance: none;
}

.signup__field input::placeholder {
  color: var(--ink-muted);
}

.signup__field input:focus {
  outline: none;
  border-bottom-color: var(--bronze);
}

.signup__submit {
  flex-shrink: 0;
  padding: 0.85rem 1.5rem;
  border: 0;
  border-radius: 2px;
  background: var(--bronze);
  color: var(--paper);
  font: inherit;
  font-weight: var(--weight-label);
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.signup__submit:hover {
  background: color-mix(in srgb, var(--bronze) 88%, black);
}

.signup__submit:disabled {
  opacity: 0.55;
  cursor: wait;
}

.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.signup__note,
.signup__message {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.signup__message[hidden] {
  display: none;
}

.signup__message.is-error {
  color: var(--bronze);
}

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

  .signup__submit {
    align-self: stretch;
  }
}

@media (min-width: 960px) {
  .waitlist {
    padding: 5rem 3.5rem 5.5rem;
  }
}

/* ——— Section 2: product ——— */
.product {
  display: grid;
  gap: 2rem;
  padding: 0 0 4rem;
  background: var(--surface);
}

.product__media {
  margin: 0;
}

.product__media img {
  width: 100%;
}

.product__copy {
  padding: 0 1.25rem 1rem;
  max-width: 34rem;
}

.product__copy .label {
  display: block;
  margin-bottom: 1rem;
  color: var(--ink-muted);
}

.product__copy h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.15;
}

.product__copy p {
  margin: 1rem 0 0;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
}

.product__copy .spec {
  margin: 1.5rem 0 0;
}

@media (min-width: 900px) {
  .product {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 3.5rem;
    padding: 0 3.5rem 4rem 0;
  }

  .product__copy {
    padding: 3rem 0 3rem 0;
  }
}

/* ——— Finishes ——— */
.finishes {
  padding: 0 1.25rem 4rem;
  background: var(--surface);
}

.finishes > .label {
  display: block;
  margin-bottom: 1.5rem;
  color: var(--ink-muted);
}

.finishes__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 0.85rem;
  max-width: calc(990px * 2 + 0.85rem);
}

.finishes__grid figure {
  margin: 0;
}

.finishes__grid img {
  width: 100%;
  max-width: 990px;
  aspect-ratio: 990 / 660;
  object-fit: cover;
  object-position: center;
}

.finishes__grid figcaption {
  margin-top: 0.75rem;
  color: var(--ink-muted);
}

@media (min-width: 768px) {
  .finishes__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem 1rem;
    max-width: none;
  }
}

@media (min-width: 960px) {
  .finishes {
    padding: 0 3.5rem 5rem;
  }
}

/* ——— Section 3 ——— */
.statement {
  padding: 0 0 3.5rem;
}

.statement__media {
  margin: 0;
}

.statement__media img {
  width: 100%;
  object-fit: cover;
  object-position: center;
}

.statement__line {
  margin: 1.75rem 1.25rem 0;
  text-align: center;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: var(--weight-heading);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

@media (min-width: 960px) {
  .statement {
    padding-bottom: 4.5rem;
  }

  .statement__line {
    margin-top: 2.25rem;
  }
}

/* ——— Maker's note ——— */
.note {
  padding: 2.5rem 1.25rem 3.5rem;
  border-top: 1px solid var(--line);
}

.note__inner {
  max-width: 28rem;
  margin: 0 auto;
  text-align: center;
}

.note__inner p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

/* ——— Simple pages (confirmed / privacy / 404) ——— */
.page {
  padding: 3rem 1.25rem 5rem;
  min-height: 60vh;
}

.page__inner {
  max-width: 34rem;
}

.page h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
}

.page p {
  margin: 1.25rem 0 0;
  max-width: 34em;
  color: var(--ink-muted);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
}

.page__links {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.9375rem;
}

.page--narrow .page__inner {
  max-width: 32rem;
}

.page--narrow p {
  color: var(--ink);
}

.page--about {
  padding-top: 4.5rem;
  padding-bottom: 6rem;
}

.page--about .page__inner {
  max-width: 34em;
}

.page--about h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.01em;
}

.page--about p {
  color: var(--ink);
  font-weight: var(--weight-body);
  line-height: 1.6;
}

.page--about h2.label {
  margin: 3rem 0 0;
  color: var(--ink-muted);
}

.page--about h2.label + p {
  margin-top: 1.25rem;
}

@media (min-width: 960px) {
  .site-header {
    padding: 2.25rem 3.5rem 1.75rem;
  }

  .site-footer {
    padding: 3.5rem 3.5rem 3rem;
  }

  .page {
    padding: 4rem 3.5rem 6rem;
  }

  .page--about {
    padding: 6rem 3.5rem 8rem;
  }

  .note {
    padding: 3.5rem 3.5rem 4.5rem;
  }
}
