:root {
  --bg: #f6f4ef;
  --bg-raised: #fffdf8;
  --fg: #131211;
  --muted: #6d6a64;
  --faint: #a19d95;
  --line: rgba(19, 18, 17, 0.09);
  --header-bg: rgba(246, 244, 239, 0.72);
  --sun-a: #ffd08a;
  --sun-b: #ff8a4c;
  --sun-c: #f2536b;
  --glow: rgba(255, 128, 72, 0.32);
  --btn-bg: #131211;
  --btn-fg: #f6f4ef;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", "Charter", Georgia, serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0b0a;
    --bg-raised: #151412;
    --fg: #f4f2ed;
    --muted: #9a968e;
    --faint: #66625c;
    --line: rgba(244, 242, 237, 0.1);
    --header-bg: rgba(12, 11, 10, 0.7);
    --glow: rgba(255, 110, 64, 0.28);
    --btn-bg: #f4f2ed;
    --btn-fg: #0c0b0a;
  }
}

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

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

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font: 100%/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--sun-b);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 48rem) {
  .wrap {
    padding: 0 2rem;
  }
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  padding: 0.5rem 0.75rem;
  background: var(--bg-raised);
  border-radius: 8px;
}

/* ───────── Header ───────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease-out;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
}

.site-header .wrap {
  height: 3.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.mark {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
}

.header-nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 150ms ease-out;
}

.header-nav a:hover {
  color: var(--fg);
}

.header-nav .hide-sm {
  display: none;
}

@media (min-width: 36rem) {
  .header-nav .hide-sm {
    display: inline;
  }
}

/* ───────── Buttons ───────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.875rem;
  padding: 0 1.25rem;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: transform 120ms ease-out, opacity 150ms ease-out;
}

.btn:hover {
  opacity: 0.88;
}

.btn:active {
  transform: scale(0.97);
}

.btn svg {
  width: 1rem;
  height: 1rem;
  transition: transform 200ms var(--ease-out);
}

.btn:hover svg {
  transform: translateX(2px);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--line);
}

.btn-sm {
  height: 2.25rem;
  padding: 0 0.95rem;
  font-size: 0.8125rem;
}

.header-nav .btn,
.header-nav .btn:hover {
  color: var(--btn-fg);
}

/* ───────── Hero ───────── */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 9vw, 6.5rem) 0 0;
  text-align: center;
  --sun: clamp(18rem, 52vw, 38rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.75rem;
  padding: 0.35rem 0.8rem 0.35rem 0.6rem;
  border-radius: 999px;
  background: var(--bg-raised);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
  letter-spacing: -0.005em;
}

.eyebrow .dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sun-a), var(--sun-c));
}

.hero h1 {
  margin: 0 auto;
  max-width: 14ch;
  font-family: var(--display);
  font-size: clamp(2.75rem, 9vw, 6.25rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 600;
}

.hero h1 em,
.section-title em,
.contact-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.hero h1 em {
  background: linear-gradient(100deg, var(--sun-b) 10%, var(--sun-c) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.06em;
}

.lede {
  margin: 1.75rem auto 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

/* Sunrise */
.sunrise {
  position: relative;
  height: calc(var(--sun) * 0.56);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  pointer-events: none;
}

.sun {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: var(--sun);
  aspect-ratio: 1;
  margin-left: calc(var(--sun) / -2);
  border-radius: 50%;
  background: linear-gradient(180deg, var(--sun-a) 0%, var(--sun-b) 42%, var(--sun-c) 78%);
  box-shadow: 0 0 140px 30px var(--glow);
  transform: translateY(50%);
}

.sunrise::after {
  /* horizon: page colour below the line hides the lower half of the sun */
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--line);
}

.horizon-fade {
  position: absolute;
  inset: auto 0 -1px;
  height: 45%;
  background: linear-gradient(to bottom, transparent, var(--bg) 92%);
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Entrance */
.rise {
  animation: rise 900ms var(--ease-out) both;
}

.rise-1 { animation-delay: 60ms; }
.rise-2 { animation-delay: 140ms; }
.rise-3 { animation-delay: 220ms; }
.rise-4 { animation-delay: 300ms; }

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

.sun {
  animation: sunrise 1800ms var(--ease-out) 200ms both;
}

@keyframes sunrise {
  from {
    opacity: 0;
    transform: translateY(85%);
  }
}

/* ───────── Sections ───────── */

.section {
  padding: clamp(4.5rem, 10vw, 7.5rem) 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-label {
  margin: 0 0 1rem;
  color: var(--faint);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  max-width: 20ch;
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 600;
}

.principles {
  display: grid;
  gap: 1rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

@media (min-width: 48rem) {
  .principles {
    grid-template-columns: repeat(3, 1fr);
  }
}

.principle {
  padding: 1.75rem;
  border-radius: 1.25rem;
  background: var(--bg-raised);
  box-shadow: inset 0 0 0 1px var(--line);
}

.principle .num {
  display: block;
  margin-bottom: 2.5rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--sun-b);
}

.principle h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.principle p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* Studio details */
.studio {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 48rem) {
  .studio {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 4rem;
  }
}

.studio-copy p {
  margin: 1.25rem 0 0;
  max-width: 28rem;
  color: var(--muted);
  font-size: 1.0625rem;
}

.details {
  margin: 0;
  border-radius: 1.25rem;
  background: var(--bg-raised);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}

.details div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.5rem;
  font-size: 0.9375rem;
}

.details div + div {
  border-top: 1px solid var(--line);
}

.details dt {
  color: var(--muted);
}

.details dd {
  margin: 0;
  text-align: right;
  font-weight: 500;
}

.details a {
  text-decoration: none;
}

.details a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Contact */
.contact {
  text-align: center;
}

.contact-title {
  margin: 0 auto;
  font-family: var(--display);
  font-size: clamp(2.5rem, 7vw, 4.75rem);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 600;
}

.contact p {
  margin: 1.25rem auto 2.25rem;
  max-width: 28rem;
  color: var(--muted);
  font-size: 1.0625rem;
}

.email-link {
  display: inline-block;
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-bottom: 0.15em;
  transition: background-size 300ms var(--ease-out);
}

.email-link:hover {
  background-size: 100% 1px;
}

/* ───────── Footer ───────── */

.site-footer {
  margin-top: auto;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--muted);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
}

.site-footer nav {
  display: flex;
  gap: 1.5rem;
}

.site-footer a {
  text-decoration: none;
  transition: color 150ms ease-out;
}

.site-footer a:hover,
.site-footer a[aria-current="page"] {
  color: var(--fg);
}

/* ───────── Legal pages ───────── */

.legal {
  flex: 1;
  padding: clamp(3rem, 8vw, 5.5rem) 0 5rem;
}

.legal .wrap {
  max-width: 44rem;
}

.legal h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.legal .updated {
  margin: 0.75rem 0 3rem;
  color: var(--faint);
  font-size: 0.875rem;
}

.legal h2 {
  margin: 2.75rem 0 0.75rem;
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.legal p,
.legal li {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--muted);
}

.legal strong {
  color: var(--fg);
  font-weight: 600;
}

.legal p {
  margin: 0 0 1rem;
}

.legal ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.legal li {
  margin-bottom: 0.5rem;
}

.legal a {
  color: var(--fg);
  text-decoration-color: var(--line);
  text-underline-offset: 0.2em;
}

.legal a:hover {
  text-decoration-color: currentColor;
}

/* ───────── Preferences ───────── */

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

  .rise,
  .sun {
    animation: none;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

[id] {
  scroll-margin-top: 3.75rem;
}
