/* Migaki v8 "Glacier". Glass material language (Mercury register), slate night
   ground, glacier blue accent. See DESIGN.md and BRAND.md. */

@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Charis SIL";
  src: url("../fonts/charis-sil-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Charis SIL";
  src: url("../fonts/charis-sil-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --ground: #0d1119;
  --ink: #f2f6fb;
  --ink-secondary: #a9b1bf;
  --accent: #a8c7e8;
  --accent-ink: #0b1018;
  --hairline: rgba(242, 246, 251, 0.16);
  --hairline-soft: rgba(242, 246, 251, 0.09);
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.09);
  --glass-border: rgba(255, 255, 255, 0.14);
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 12px;
  --sans: "Geist", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --serif: Charter, "Charis SIL", Georgia, serif;
  --gutter: clamp(24px, 5vw, 64px);
  color-scheme: dark;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background: var(--ground);
  scroll-behavior: smooth;
}

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

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  background: rgba(13, 17, 25, 0.55);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--hairline-soft);
  flex: none;
}

.nav-brand {
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
}

.nav-brand svg,
.nav-brand img {
  height: 0.92rem;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: clamp(8px, 1.5vw, 14px);
}

.nav-links a {
  font-size: 0.92rem;
  color: var(--ink-secondary);
  padding: 8px 14px;
  border-radius: 999px;
  transition-property: color, background-color;
  transition-duration: 0.2s;
  transition-timing-function: ease;
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--glass);
}

.nav-links a[aria-current="page"] {
  color: var(--ink);
  background: var(--glass-strong);
}

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

.hero {
  position: relative;
  min-height: min(82vh, 760px);
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-media img {
    animation: hero-settle 26s cubic-bezier(0.1, 0, 0.3, 1) both;
  }
}

@keyframes hero-settle {
  from {
    scale: 1.07;
  }
  to {
    scale: 1;
  }
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(13, 17, 25, 0.62) 0%, rgba(13, 17, 25, 0.18) 45%, rgba(13, 17, 25, 0.55) 100%);
}

.hero-inner {
  width: 100%;
  padding: 0 var(--gutter) clamp(1.8rem, 5vh, 3rem);
  max-width: 1200px;
  margin: 0 auto;
}

.hero-panel {
  border-radius: var(--r-lg);
  padding: 1.6rem 2.2rem;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.hero-copy {
  max-width: 38rem;
}

.hero h1 {
  font-weight: 400;
  font-size: clamp(1.5rem, 2.7vw, 2rem);
  line-height: 1.28;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.hero-sub {
  margin-top: 0.7rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  opacity: 0.85;
  text-wrap: pretty;
}

.hero .button {
  font-size: 0.94rem;
  padding: 0.8em 1.9em;
  flex: none;
}

@media (max-width: 640px) {
  .hero-panel {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
  }
}

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

.button {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
  color: var(--accent-ink);
  background: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.8em 1.9em;
  border-radius: 999px;
  cursor: pointer;
  text-align: center;
  transition-property: background-color, border-color, color;
  transition-duration: 0.2s;
  transition-timing-function: ease;
}

.button:hover {
  background: #c2d9f2;
  border-color: #c2d9f2;
}

.button-ghost {
  color: var(--ink);
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
}

.button-ghost:hover {
  background: var(--glass-strong);
  border-color: rgba(255, 255, 255, 0.4);
}

@media (prefers-reduced-motion: no-preference) {
  .button {
    transition-property: background-color, border-color, color, scale;
    transition-duration: 0.2s, 0.2s, 0.2s, 0.15s;
  }

  .button:active {
    scale: 0.96;
  }
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(4rem, 10vh, 6.5rem) var(--gutter);
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-kicker {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-secondary);
}

.keyline {
  width: 3rem;
  height: 2px;
  background: var(--accent);
  margin-top: 1.6rem;
  border-radius: 2px;
}

.prose-heading {
  margin-top: 1.2rem;
  font-weight: 400;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
  max-width: 22em;
}

.statement {
  font-weight: 300;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
  max-width: 24em;
}

.section-cta {
  margin-top: clamp(2.2rem, 5vh, 3.2rem);
}

/* ---------- Banner (About) ---------- */

.banner {
  position: relative;
  isolation: isolate;
  padding: clamp(4rem, 12vh, 7rem) var(--gutter);
}

.banner-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.banner-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(13, 17, 25, 0.72), rgba(13, 17, 25, 0.88) 80%, var(--ground) 100%);
}

.banner-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.banner .prose-heading {
  margin-top: 1.1rem;
}

.banner-lead {
  margin-top: 1.4rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.65;
  color: var(--ink);
  opacity: 0.88;
  max-width: 42em;
  text-wrap: pretty;
}

/* ---------- The shift ---------- */

.shift-head {
  display: grid;
  grid-template-columns: 10.5rem 1fr auto 1.3fr;
  gap: clamp(1rem, 2.5vw, 1.8rem);
  padding: 0 1.6rem 0.7rem;
  margin-top: clamp(2.2rem, 5vh, 3.2rem);
}

.shift-head span {
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-secondary);
}

.shift-head .head-old {
  text-align: right;
}

.shift-head .head-new {
  color: var(--accent);
}

.shift-head + .shift {
  margin-top: 0;
}

@media (max-width: 640px) {
  .shift-head {
    display: none;
  }
}


.shift {
  margin-top: clamp(2.2rem, 5vh, 3.2rem);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.sh-row {
  display: grid;
  grid-template-columns: 10.5rem 1fr auto 1.3fr;
  gap: clamp(1rem, 2.5vw, 1.8rem);
  align-items: baseline;
  padding: 1.15rem 1.6rem;
  border-radius: var(--r-md);
  background: var(--glass);
  border: 1px solid var(--hairline-soft);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  transition-property: background-color, border-color;
  transition-duration: 0.2s;
  transition-timing-function: ease;
}

.sh-row:hover {
  background: var(--glass-strong);
  border-color: var(--glass-border);
}

.sh-dim {
  font-weight: 500;
  font-size: 1rem;
}

.sh-old {
  font-family: var(--serif);
  color: var(--ink-secondary);
  font-size: 1rem;
  text-align: right;
  text-wrap: pretty;
}

.sh-arrow {
  color: var(--accent);
  font-size: 1.05rem;
}

.sh-new {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  text-wrap: pretty;
}

@media (max-width: 640px) {
  .sh-row {
    grid-template-columns: 1fr auto 1.3fr;
    row-gap: 0.4rem;
    padding: 1rem 1.2rem;
  }

  .sh-dim {
    grid-column: 1 / -1;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-secondary);
  }

  .sh-old {
    text-align: left;
  }
}

/* ---------- Closing statement ---------- */

.closing-break {
  margin-top: clamp(2rem, 6vh, 4rem);
  border-top: 1px solid var(--hairline-soft);
  padding-top: clamp(4rem, 10vh, 6.5rem);
}

.closing p {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  line-height: 1.45;
  max-width: 30em;
  text-wrap: pretty;
}

/* ---------- Contact ---------- */

.contact-idea {
  margin-top: 1.6rem;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink-secondary);
  max-width: 34em;
  text-wrap: pretty;
}

.contact-single {
  margin-top: clamp(1.8rem, 4vh, 2.5rem);
  max-width: 34rem;
}

.contact-panel {
  border-radius: 24px;
  padding: clamp(1.6rem, 3.5vw, 2.4rem);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

@media (max-width: 860px) {
  .contact-single {
    max-width: none;
  }
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.field label {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-secondary);
  margin-bottom: 0.45rem;
}

.field input,
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-sm);
  padding: 0.7em 0.9em;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.field textarea {
  resize: vertical;
  min-height: 6.5rem;
}

.field input:hover,
.field textarea:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.07);
}

.contact-form .button {
  align-self: flex-start;
  margin-top: 0.4rem;
}

.contact-direct {
  margin-top: 2rem;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink-secondary);
}

.text-link {
  color: var(--ink);
  border-bottom: 1px solid var(--hairline);
  transition: border-color 0.2s ease;
}

.text-link:hover {
  border-color: var(--accent);
}

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

.footer {
  flex: none;
  border-top: 1px solid var(--hairline-soft);
  padding: 2rem var(--gutter);
  font-size: 0.8rem;
  color: var(--ink-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

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

.footer-links a {
  color: var(--ink-secondary);
  padding: 8px 0;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--ink);
}

/* ---------- Legal pages ---------- */

.legal {
  max-width: 42rem;
}

.legal h1 {
  font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.01em;
}

.legal-updated {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

.legal h2 {
  margin-top: 2.6rem;
  font-weight: 500;
  font-size: 1.1rem;
}

.legal p {
  margin-top: 0.9rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink-secondary);
  text-wrap: pretty;
}

.legal p strong {
  color: var(--ink);
}

/* ---------- Scroll reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    translate: 0 12px;
    transition-property: opacity, translate;
    transition-duration: 0.5s;
    transition-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
  }

  .reveal.is-visible {
    opacity: 1;
    translate: 0 0;
  }
}

/* ---------- Entrance fade ---------- */

@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    animation: fade-up 0.45s cubic-bezier(0.23, 1, 0.32, 1) both;
  }

  .fade-in:nth-child(2) {
    animation-delay: 0.08s;
  }

  .fade-in:nth-child(3) {
    animation-delay: 0.16s;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    translate: 0 10px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

/* ---------- Small screens ---------- */

@media (max-width: 480px) {
  .nav {
    height: 64px;
  }

  .hero {
    min-height: 74vh;
  }

  .hero-panel {
    padding: 1.5rem 1.4rem;
  }

  .hero .button,
  .contact-form .button {
    width: 100%;
    padding-top: 1em;
    padding-bottom: 1em;
  }

  .contact-form .button {
    align-self: stretch;
  }

  .footer {
    font-size: 0.72rem;
    flex-direction: column;
    align-items: flex-start;
  }
}
