/* Trial direction: Scandinavian minimalism (structured grid, bold but clean type, smooth hover
   states) meets luxury editorial (generous whitespace, imagery first, no clutter). */

:root {
  color-scheme: light;

  --bg: #fcfbf9;
  --surface: #f3f1ed;
  --ink: #111214;
  --ink-soft: #5e5f64;
  --hairline: #dedbd5;
  --red: #980224; /* from the logo, used for single words only */

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --page: 90rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

::selection {
  background: var(--ink);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.accent {
  color: var(--red);
}

/* Small letter-spaced labels */
.kicker,
.step-no,
.signup label[for="email"] {
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* Text links: the underline retracts on hover and grows back */
a {
  color: inherit;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size 0.45s var(--ease);
}

a:hover {
  background-position: 100% 100%;
  background-size: 0% 1px;
}

.brand a,
.page-header a,
.button-link {
  background: none;
}

/* Buttons: black, with an arrow that nudges forward on hover */
.field button,
.button-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.35s var(--ease);
}

.field button::after,
.button-link::after {
  content: "→";
  transition: transform 0.35s var(--ease);
}

.field button:hover,
.button-link:hover {
  background: #2c2d31;
}

.field button:hover::after,
.button-link:hover::after {
  transform: translateX(4px);
}

/* Hero: logo on top; photo (mobile) or photo right of the text (desktop) */

.hero {
  display: grid;
  grid-template-areas: "brand" "media" "content";
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.brand {
  grid-area: brand;
  padding: 1.25rem 0;
}

.brand a {
  display: inline-block;
}

.brand img {
  height: 2.25rem;
  width: auto;
}

.hero-media {
  grid-area: media;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--surface);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 32% 24%;
  transition: transform 1.6s var(--ease);
}

.hero-media:hover img {
  transform: scale(1.035);
}

.hero-content {
  grid-area: content;
  container-type: inline-size;
  padding: 3rem 0 5rem;
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-rows: auto auto;
    grid-template-areas:
      "brand brand"
      "content media";
    column-gap: clamp(3rem, 7vw, 8rem);
    padding-bottom: clamp(4rem, 8vw, 7rem);
  }

  .brand {
    padding: 2.25rem 0 2.75rem;
  }

  .brand img {
    height: 2.5rem;
  }

  .hero-media {
    aspect-ratio: auto;
    height: min(78svh, 56rem);
  }

  .hero-content {
    align-self: center;
    max-width: 32rem;
    padding: 0;
  }
}

h1 {
  /* Scales with the text column so "Great glasses." fits on one line (about 6.3em wide). */
  font-size: clamp(2.75rem, 1.8rem + 3.5vw, 4.5rem);
  font-size: clamp(2.75rem, 15cqi, 5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.lead {
  max-width: 28rem;
  margin-top: 1.75rem;
  color: var(--ink-soft);
  font-size: 1.125rem;
  text-wrap: pretty;
}

/* Signup form */

.signup {
  max-width: 28rem;
  margin-top: 2.75rem;
}

.signup label[for="email"] {
  display: block;
  margin-bottom: 0.9rem;
}

.field {
  display: flex;
  background: #fff;
  border: 1px solid var(--ink);
  transition: box-shadow 0.35s var(--ease);
}

.field:focus-within {
  box-shadow: 0 0 0 3px rgba(17, 18, 20, 0.12);
}

.field input {
  flex: 1;
  min-width: 0;
  padding: 1rem 1.1rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  outline: none; /* the whole .field shows the focus state */
}

.field input::placeholder {
  color: #77787d;
}

.field button {
  padding: 0 1.35rem;
}

.field button:disabled {
  opacity: 0.7;
  cursor: progress;
}

.fineprint {
  margin-top: 0.9rem;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  text-wrap: pretty;
}

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

/* Result messages: shown by app.js via data-state, or by :target after a no-JS post. */

.form-message {
  display: none;
}

.form-message:focus {
  outline: none;
}

.form-message.success {
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: #fff;
  border: 1px solid var(--hairline);
}

.form-message.success svg {
  flex: none;
  width: 2rem;
  height: 2rem;
  padding: 0.4rem;
  border-radius: 50%;
  background: var(--ink);
  fill: none;
  stroke: #fff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-message.error {
  margin-top: 0.9rem;
  padding: 0.35rem 0 0.35rem 0.9rem;
  border-left: 2px solid var(--red);
  color: var(--red);
  font-size: 0.9rem;
  font-weight: 600;
}

.signup[data-state="success"] form,
.signup:has(#subscribed:target) form {
  display: none;
}

.signup[data-state="success"] .success,
.success:target {
  display: flex;
}

.signup[data-state="error"] .error,
.error:target {
  display: block;
}

.signup[data-state="sending"] .field {
  opacity: 0.85;
}

/* Sections */

.section {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(5rem, 11vw, 10rem) var(--gutter);
}

h2 {
  max-width: 18ch;
  margin-top: 1rem;
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.5rem);
  line-height: 1.06;
}

/* Steps: a structured three-column grid with hairlines; an ink line draws in on hover */

.steps {
  border-top: 1px solid var(--hairline);
}

.steps ol {
  display: grid;
  margin: clamp(3rem, 6vw, 5rem) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--hairline);
}

.steps li {
  position: relative;
  padding: 2rem 0 2.5rem;
  border-bottom: 1px solid var(--hairline);
}

.steps li::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease);
}

.steps li:hover::before {
  transform: scaleX(1);
}

.step-no {
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.steps h3 {
  margin-top: 1.75rem;
  font-size: 1.375rem;
  line-height: 1.2;
}

.steps li p {
  max-width: 22rem;
  margin-top: 0.6rem;
  color: var(--ink-soft);
}

@media (min-width: 760px) {
  .steps ol {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid var(--hairline);
  }

  .steps li {
    padding: 2.25rem 2rem 3rem;
    border-bottom: 0;
    border-left: 1px solid var(--hairline);
  }

  .steps li:first-child {
    padding-left: 0;
    border-left: 0;
  }
}

/* Fair prices: a centred statement with plenty of air around it */

.fair {
  padding-top: 0;
}

.fair-card {
  display: grid;
  justify-items: center;
  gap: 2.75rem;
  padding-top: clamp(5rem, 11vw, 10rem);
  border-top: 1px solid var(--hairline);
  text-align: center;
}

.fair-card h2 {
  max-width: none;
  margin-top: 0;
  font-size: clamp(2.5rem, 1.4rem + 4.4vw, 5rem);
  line-height: 1.02;
}

.fair-card p {
  max-width: 34rem;
  margin: 1.5rem auto 0;
  color: var(--ink-soft);
  font-size: 1.125rem;
  text-wrap: pretty;
}

.button-link {
  padding: 1.1rem 1.6rem;
}

.site-footer {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter) 3rem;
  color: var(--ink-soft);
  font-size: 0.8125rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--hairline);
}

/* Legal page */

.page-header,
.legal {
  max-width: calc(44rem + 2 * var(--gutter));
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.page-header {
  padding-top: 2.25rem;
}

.page-header a {
  display: inline-block;
}

.page-header img {
  height: 2.25rem;
  width: auto;
}

.legal {
  padding-block: 4rem 6rem;
}

.legal h1 {
  font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.25rem);
  line-height: 1.05;
}

.legal h2 {
  max-width: none;
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
  font-size: 1.5rem;
}

.legal h3 {
  margin-top: 2rem;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

.legal p,
.legal address {
  margin-top: 0.6rem;
  color: var(--ink-soft);
}

.legal address {
  color: var(--ink);
  font-style: normal;
  line-height: 1.7;
}

.legal .updated {
  margin-top: 3rem;
  font-size: 0.8125rem;
}

.site-footer--narrow .container {
  max-width: 44rem;
  margin: 0 auto;
}

/* Motion */

@media (prefers-reduced-motion: no-preference) {
  .hero-media img {
    animation: fade-in 1.4s var(--ease) both;
  }

  .hero-content > * {
    animation: rise 0.9s var(--ease) both;
  }

  .hero-content > :nth-child(2) { animation-delay: 0.1s; }
  .hero-content > :nth-child(3) { animation-delay: 0.2s; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
  }

  .hero-media:hover img {
    transform: none;
  }
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
