/* ==========================================================================
   We Love Curls: pre-launch site
   Palette from the brief (welovecurls-website-brief.md, section 2).
   Change colours here only.
   ========================================================================== */

:root {
  /* Palette */
  --ivory: #F4EFD5;        /* page background; text on hero and dark buttons */
  --sand: #EDCDA8;         /* alternate sections, form fields */
  --camel: #DCAD78;        /* soft surfaces, borders */
  --gold: #D7AE84;         /* hover, rules, accents */
  --cognac: #A97244;       /* accent: rules, underlines, large type (3.5:1 on ivory, so not small text) */
  --rust: #5B2C14;         /* buttons, link text on light backgrounds */
  --taupe: #5A432D;        /* secondary text */
  --espresso: #231913;     /* primary text */
  --deep: #160D09;         /* footer, dark surfaces, hero scrim */
  --deep-rgb: 22 13 9;

  /* Type */
  --font-display: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --font-body: "Nunito Sans", "Source Sans 3", system-ui, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: clamp(1.375rem, 1.1rem + 1vw, 1.625rem);
  --step-3: clamp(1.5rem, 1.1rem + 1.8vw, 2.25rem);
  --step-4: clamp(2rem, 1.3rem + 3vw, 3.25rem);
  --step-5: clamp(2.75rem, 1.4rem + 5.8vw, 6rem);

  /* Space */
  --gutter: clamp(1rem, 5vw, 3rem);
  --section-space: clamp(4.5rem, 10vw, 8rem);
  --measure: 60ch;
  --max: 74rem;
  --radius: 0.75rem;

  /* Per-surface colours, redefined by section modifiers */
  --text: var(--espresso);
  --text-soft: var(--taupe);
  --link: var(--rust);
  --focus: var(--rust);
}

/* ---------- Base ---------- */

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-optical-sizing: auto;
}

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

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 100;
  font-weight: 400;
  text-wrap: balance;
}

h2 {
  font-size: var(--step-4);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: var(--step-2);
  line-height: 1.2;
  font-weight: 450;
  margin-bottom: 0.5rem;
}

p {
  margin: 0 0 1em;
  max-width: var(--measure);
  text-wrap: pretty;
}

a {
  color: var(--link);
  text-decoration-color: var(--cognac);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
}

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

[hidden] { display: none !important; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: var(--ivory);
  color: var(--espresso);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  /* Line the header up with the content column on wide screens */
  padding: 1.25rem max(var(--gutter), calc((100% - var(--max)) / 2));
  color: var(--ivory);
  --focus: var(--gold);
}

.wordmark {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 100;
  font-size: var(--step-1);
  color: inherit;
  text-decoration: none;
}

.nav-list {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  color: var(--ivory);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  padding-block: 0.25rem;
  border-bottom: 1px solid transparent;
}

.nav-list a:hover { border-bottom-color: var(--gold); }

.nav-toggle {
  display: none;
  font: inherit;
  font-weight: 600;
  color: var(--ivory);
  background: rgb(var(--deep-rgb) / 0.35);
  border: 1px solid rgb(244 239 213 / 0.5);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
}

@media (max-width: 47.99rem) {
  .js .nav-toggle { display: block; }

  .js .nav-list {
    display: none;
    position: absolute;
    right: var(--gutter);
    top: calc(100% - 0.25rem);
    flex-direction: column;
    gap: 0;
    min-width: 13rem;
    padding: 0.5rem;
    border-radius: var(--radius);
    background: var(--deep);
    box-shadow: 0 1rem 2.5rem rgb(var(--deep-rgb) / 0.4);
  }

  .js .nav-list.is-open { display: flex; }

  .js .nav-list a {
    display: block;
    padding: 0.75rem 1rem;
    border-bottom: 0;
    border-radius: 0.5rem;
  }

  .js .nav-list a:hover { background: rgb(244 239 213 / 0.08); }

  /* Without JavaScript the links simply wrap under the wordmark */
  html:not(.js) .site-header { flex-wrap: wrap; }
  html:not(.js) .nav-list { flex-wrap: wrap; gap: 0.25rem 1rem; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 88vh;
  min-height: 88svh;
  padding: 7rem var(--gutter) clamp(5rem, 10vh, 6.5rem);
  overflow: hidden;
  isolation: isolate;
  color: var(--ivory);
  background: var(--deep) url("../assets/poster.jpg") center / cover no-repeat;
  --focus: var(--gold);
}

@media (min-width: 48rem) {
  .hero { min-height: 96vh; min-height: 96svh; }
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top,
      rgb(var(--deep-rgb) / 0.82) 0%,
      rgb(var(--deep-rgb) / 0.55) 38%,
      rgb(var(--deep-rgb) / 0.4) 70%,
      rgb(var(--deep-rgb) / 0.55) 100%),
    linear-gradient(to right, rgb(var(--deep-rgb) / 0.3), transparent 65%);
}

.hero-copy {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
}

.hero-eyebrow {
  margin-bottom: 1.25rem;
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--gold);
}

.hero h1 {
  max-width: 13ch;
  font-size: var(--step-5);
  line-height: 1.02;
  letter-spacing: -0.015em;
  font-weight: 380;
  margin-bottom: 1.5rem;
}

.hero-lede {
  max-width: 34rem;
  font-size: var(--step-1);
  line-height: 1.5;
  margin-bottom: 2rem;
}

.video-toggle {
  position: absolute;
  right: var(--gutter);
  bottom: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.9rem;
  font: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ivory);
  background: rgb(var(--deep-rgb) / 0.5);
  border: 1px solid rgb(244 239 213 / 0.45);
  border-radius: 999px;
  cursor: pointer;
}

.video-toggle:hover { border-color: var(--gold); }

/* Pause bars by default; a play triangle once paused */
.video-toggle-icon {
  width: 0.7rem;
  height: 0.75rem;
  border-inline: 0.22rem solid currentColor;
}

.video-toggle.is-paused .video-toggle-icon {
  width: 0;
  height: 0;
  border-inline: 0;
  border-left: 0.65rem solid currentColor;
  border-block: 0.4rem solid transparent;
}

@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.75rem;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  color: var(--ivory);
  background: var(--rust);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.button:hover {
  color: var(--espresso);
  background: var(--gold);
  text-decoration: none;
}

.button-light {
  color: var(--espresso);
  background: var(--ivory);
}

/* ---------- Sections and layout ---------- */

.section {
  padding: var(--section-space) var(--gutter);
  background: var(--surface, var(--ivory));
  color: var(--text);
}

.section-ivory { --surface: var(--ivory); --field: var(--sand); }
.section-sand  { --surface: var(--sand);  --field: var(--ivory); }

.section-dark {
  --surface: var(--espresso);
  --field: var(--ivory);
  --text: var(--ivory);
  --text-soft: var(--sand);
  --link: var(--gold);
  --focus: var(--gold);
}

.container,
.split {
  max-width: var(--max);
  margin-inline: auto;
}

.split {
  display: grid;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}

@media (min-width: 56rem) {
  .split { grid-template-columns: 1.15fr 0.85fr; }
  .split-flip { grid-template-columns: 0.85fr 1.15fr; }
  .split-flip .split-media { order: -1; }
  .split-even { grid-template-columns: 1fr 1fr; align-items: start; }
}

.section-title { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }

/* Images framed like the salon's arched and round mirrors */

.frame {
  margin: 0;
  width: 100%;
  justify-self: center;
}

.frame img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: var(--focus-x, 50%) 50%;
  outline: 1px solid var(--cognac);
  outline-offset: 0.6rem;
}

.frame-arch { max-width: 26rem; }
.frame-arch img {
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px 0.5rem 0.5rem;
}

.frame-round { max-width: 28rem; }
.frame-round img {
  aspect-ratio: 1;
  border-radius: 50%;
}

.section-dark .frame img { outline-color: var(--gold); }

/* Our approach */

.feature {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.feature + .feature { margin-top: clamp(4rem, 9vw, 7rem); }

.feature-media { max-width: 22rem; justify-self: start; }

@media (min-width: 48rem) {
  .feature { grid-template-columns: 5fr 6fr; gap: clamp(3rem, 7vw, 7rem); }
  .feature-flip { grid-template-columns: 6fr 5fr; }
  .feature-flip .feature-media { order: 2; justify-self: end; }
}

.feature-text h3 {
  font-size: var(--step-3);
  margin-bottom: 1rem;
}

.statement {
  max-width: 32ch;
  margin: clamp(4.5rem, 10vw, 7.5rem) 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--cognac);
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 100;
  font-style: italic;
  font-size: var(--step-3);
  line-height: 1.3;
}

/* Services */

.service-list {
  margin: 0.5rem 0 2rem;
  padding: 0;
  list-style: none;
  max-width: var(--measure);
}

.service-list li {
  display: grid;
  gap: 0.25rem 2rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--camel);
}

.service-list li:last-child { border-bottom: 1px solid var(--camel); }

@media (min-width: 36rem) {
  .service-list li { grid-template-columns: 11rem 1fr; align-items: baseline; }
}

.service-list h3 { margin: 0; }
.service-list p { margin: 0; color: var(--text-soft); }

/* ---------- Forms ---------- */

.form {
  display: grid;
  gap: 1.25rem;
  max-width: 36rem;
  margin-top: 2rem;
}

.field { display: grid; gap: 0.4rem; }

.field-row { display: grid; gap: 1.25rem; }

@media (min-width: 36rem) {
  .field-row,
  .form-inline { grid-template-columns: 1fr 1fr; }
  .form-inline > :not(.field) { grid-column: 1 / -1; }
}

label {
  font-size: 0.9375rem;
  font-weight: 700;
}

.optional { font-weight: 400; color: var(--text-soft); }

input,
textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 1rem;
  font: inherit;
  color: var(--espresso);
  background: var(--field, var(--sand));
  border: 1px solid var(--taupe);
  border-radius: var(--radius);
}

textarea { resize: vertical; min-height: 7rem; }

input:focus-visible,
textarea:focus-visible {
  outline-offset: 1px;
  border-color: var(--rust);
}

[aria-invalid="true"] {
  border: 2px solid var(--rust);
}

.section-dark [aria-invalid="true"] { border-color: var(--gold); }

.form .button { justify-self: start; }

.form-note {
  margin: -0.25rem 0 0;
  font-size: var(--step--1);
  color: var(--text-soft);
}

.form-status {
  margin: 0;
  font-weight: 700;
}

.form-status:empty { display: none; }

/* Spam trap, hidden from people */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Contact */

.contact-email { margin-top: 1.5rem; }

/* ---------- Footer ---------- */

.site-footer {
  padding: clamp(3rem, 7vw, 5rem) var(--gutter);
  background: var(--deep);
  color: var(--ivory);
  --link: var(--gold);
  --focus: var(--gold);
}

.footer-inner {
  max-width: var(--max);
  margin-inline: auto;
}

.site-footer p { margin: 0 0 0.5rem; }

.footer-name {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 100;
  font-size: var(--step-3);
  line-height: 1.2;
}

.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1rem;
}

.site-footer .footer-small {
  margin-top: 2rem;
  font-size: var(--step--1);
  color: var(--sand);
}
