/* ==========================================================================
   Modula’s Beds — main stylesheet
   1. Design tokens
   2. Reset / base
   3. Layout
   4. Components
   5. Sections
   6. Animations
   ========================================================================== */

/* 1. Design tokens — swap these once the client's brand is confirmed
   -------------------------------------------------------------------------- */
:root {
  --color-bg:        #f4efe8;
  --color-surface:   #fbf8f4;
  --color-text:      #2f3a33;
  --color-muted:     #6b736c;
  --color-accent:    #b8794a;
  --color-accent-2:  #d9b48f;
  --color-line:      #e3dbd0;

  --font-heading: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --font-body:    "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 14px;
  --ease: cubic-bezier(.22, .8, .24, 1);
}

/* 2. Reset / base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.005em;
}

p { margin: 0 0 1em; }

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

a { color: inherit; }

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

/* 3. Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main { flex: 1; display: flex; }

/* 4. Components
   -------------------------------------------------------------------------- */
.site-header { padding-block: 24px; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.5rem;
}

.logo__img {
  height: clamp(72px, 9vw, 104px);
  width: auto;
}

.eyebrow {
  margin-bottom: 1rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--color-text);
  color: var(--color-surface);
  font-weight: 500;
  text-decoration: none;
  transition: transform .25s var(--ease), background-color .25s var(--ease);
}
.btn:hover { background: var(--color-accent); transform: translateY(-2px); }

.btn__icon { width: 18px; height: 18px; margin-right: 8px; }

.btn--outline {
  background: transparent;
  color: var(--color-text);
  box-shadow: inset 0 0 0 1.5px var(--color-text);
}
.btn--outline:hover { background: var(--color-text); color: var(--color-surface); }

.construction__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}
.contact-list li { display: flex; flex-direction: column; }
.contact-list__label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.contact-list a {
  font-size: 1.05rem;
  text-decoration: none;
  border-bottom: 1px solid var(--color-line);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.contact-list a:hover { color: var(--color-accent); border-color: var(--color-accent); }

.social { display: flex; flex-direction: column; gap: 8px; margin-top: 1.5rem; }
.social__list { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; }
.social__link {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--color-text);
  box-shadow: inset 0 0 0 1.5px var(--color-line);
  transition: color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.social__link svg { width: 18px; height: 18px; }
.social__link:hover { color: var(--color-accent); box-shadow: inset 0 0 0 1.5px var(--color-accent); transform: translateY(-2px); }

.progress {
  height: 6px;
  margin: 2rem 0;
  max-width: 360px;
  border-radius: 999px;
  background: var(--color-line);
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  width: var(--progress, 50%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-accent-2), var(--color-accent));
  transform-origin: left;
  animation: grow 1.6s var(--ease) .9s both;
}

.site-footer {
  padding-block: 24px;
  font-size: .875rem;
  color: var(--color-muted);
}
.site-footer p { margin: 0; }

/* 5. Sections
   -------------------------------------------------------------------------- */
.construction {
  flex: 1;
  display: flex;
  align-items: center;
  padding-block: clamp(32px, 6vw, 80px);
}

.construction__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

@media (min-width: 860px) {
  .construction__inner { grid-template-columns: 1fr 1.1fr; }
  .construction__visual { order: 2; }
}

/* Cormorant has a small x-height, so headings run larger than usual */
.construction__title { font-size: clamp(2.6rem, 6vw, 4.4rem); }

.construction__lead {
  max-width: 34rem;
  font-size: 1.125rem;
  color: var(--color-muted);
}

.construction__visual { display: flex; justify-content: center; }

/* Bed illustration — modules stack into place */
.bed {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 4 / 3;
}
.bed > div { position: absolute; border-radius: var(--radius); }

.bed__base {
  left: 0; right: 0; bottom: 8%;
  height: 18%;
  background: var(--color-text);
  animation: drop .8s var(--ease) both;
}
.bed__base::before,
.bed__base::after {
  content: "";
  position: absolute;
  bottom: -28%;
  width: 6%;
  height: 30%;
  border-radius: 0 0 4px 4px;
  background: var(--color-text);
}
.bed__base::before { left: 6%; }
.bed__base::after  { right: 6%; }

.bed__module {
  bottom: calc(8% + 18% + 2%);
  height: 20%;
  width: 31.3%;
  background: var(--color-accent-2);
  animation: drop .8s var(--ease) both;
}
.bed__module--1 { left: 0;      animation-delay: .2s; }
.bed__module--2 { left: 34.35%; animation-delay: .35s; background: var(--color-accent); }
.bed__module--3 { right: 0;     animation-delay: .5s; }

.bed__pillow {
  bottom: calc(8% + 18% + 2% + 20% + 2%);
  height: 12%;
  width: 22%;
  background: var(--color-surface);
  border: 2px solid var(--color-line);
  animation: drop .8s var(--ease) both;
}
.bed__pillow--1 { left: 4%;   animation-delay: .7s; }
.bed__pillow--2 { left: 28%;  animation-delay: .8s; }

/* 6. Animations
   -------------------------------------------------------------------------- */
@keyframes drop {
  from { opacity: 0; transform: translateY(-60px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes grow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}
