@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces.woff2") format("woff2");
  font-weight: 500 600;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --sky: #F4EDE4;
  --ink: #0B2545;
  --ink-soft: #3B4F68;
  --blue: #1B6CA8;
  --sun: #F6BD60;
  --sea: #0B2545;
  --on-sea: #F4EDE4;
  --on-sea-soft: #B9C3CF;
  --serif: "Fraunces", "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --sans: "Archivo", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --gutter: clamp(20px, 6vw, 96px);
  --section: clamp(64px, 9vw, 128px);
  --line: color-mix(in srgb, var(--ink) 16%, transparent);
  --line-sea: color-mix(in srgb, var(--on-sea) 18%, transparent);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sky: #0E1621;
    --ink: #F4EDE4;
    --ink-soft: #A9B4C2;
    --blue: #6CB2E6;
    --sea: #173E6E;
    --on-sea: #F4EDE4;
    --on-sea-soft: #B4C4D8;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--sky);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
}

a {
  color: inherit;
}

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

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

/* Header */

.top {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: clamp(16px, 2.4vw, 28px) var(--gutter);
}

.brand {
  line-height: 0;
  margin-right: auto;
}

.brand img {
  width: clamp(150px, 15vw, 190px);
  height: auto;
}

.menu,
.langs {
  display: flex;
  gap: 4px;
  font-size: 0.9375rem;
}

.menu a,
.langs a {
  padding: 6px 10px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-soft);
}

.menu a:hover,
.langs a:hover {
  color: var(--ink);
}

.langs a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px currentColor;
}

@media (max-width: 820px) {
  .menu {
    display: none;
  }
}

/* Shared section type */

main h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 72;
}

main h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  line-height: 1.2;
  font-variation-settings: "opsz" 36;
}

main h3 + p {
  margin: 8px 0 0;
}

/* Hero */

.hero {
  padding: clamp(48px, 10vh, 120px) var(--gutter) clamp(32px, 6vh, 72px);
}

.headline {
  margin: 0;
  max-width: 14em;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.5rem, 1.3rem + 5vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 120;
  text-wrap: balance;
}

.headline span {
  white-space: nowrap;
}

:lang(zh) .headline {
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.lede {
  margin: 24px 0 0;
  max-width: 36ch;
  color: var(--ink-soft);
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.375rem);
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  margin: 36px 0 0;
}

.button {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--sea);
  color: var(--on-sea);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 160ms ease-out, transform 160ms ease-out;
}

.button:hover {
  background: var(--blue);
}

.button:active {
  transform: scale(0.98);
}

.more {
  font-weight: 600;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1.5px;
}

/* Edges: the wave between sky and sea */

.edge {
  position: relative;
  height: clamp(56px, 8vw, 120px);
  overflow: hidden;
}

.edge-rise {
  height: clamp(72px, 10vw, 140px);
}

.wave {
  position: absolute;
  inset: auto 0 -1px 0;
  width: 100%;
  height: 100%;
  fill: var(--sea);
}

.edge-land .wave {
  inset: -1px 0 auto 0;
  transform: scale(-1, -1);
}

.sun {
  position: absolute;
  left: 79%;
  bottom: 0;
  width: clamp(96px, 14vw, 200px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--sun);
  transform: translate(-50%, 34%);
  animation: rise 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

@keyframes rise {
  from {
    transform: translate(-50%, 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sun {
    animation: none;
  }
}

/* Sea sections */

.sea {
  background: var(--sea);
  color: var(--on-sea);
  padding: clamp(24px, 4vw, 48px) var(--gutter) var(--section);
}

.sea p {
  color: var(--on-sea-soft);
}

.service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(32px, 6vw, 96px);
  margin: clamp(28px, 4vw, 48px) 0 0;
  padding: 0;
  list-style: none;
}

.service-list li {
  padding: 24px 0 28px;
  border-top: 1px solid var(--line-sea);
}

.foot a {
  color: inherit;
  text-underline-offset: 0.2em;
}

.service-list p {
  max-width: 40ch;
}




@media (max-width: 720px) {
  .service-list {
    grid-template-columns: 1fr;
  }
}

/* Steps */

.steps {
  padding: clamp(24px, 4vw, 48px) var(--gutter) var(--section);
}

.step-list {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px clamp(20px, 3vw, 40px);
  margin: clamp(32px, 4vw, 56px) 0 0;
  padding: 0;
  list-style: none;
}

/* The horizon line the four suns sit on */
.step-list::before {
  content: "";
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--line);
}

.step-list li {
  position: relative;
}

.step-n {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--sun);
  color: #0B2545;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  font-variant-numeric: lining-nums;
}

.step-list p {
  color: var(--ink-soft);
}

@media (max-width: 820px) {
  .step-list {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .step-list::before {
    top: 0;
    bottom: 0;
    left: 23px;
    right: auto;
    width: 1.5px;
    height: auto;
  }

  .step-list li {
    padding-left: 72px;
  }

  .step-n {
    position: absolute;
    left: 0;
    top: -6px;
    margin: 0;
  }
}

/* About */

.about {
  padding: 0 var(--gutter) var(--section);
}

.about p {
  margin: 20px 0 0;
  max-width: 30em;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.875rem);
  line-height: 1.4;
  font-variation-settings: "opsz" 48;
}

/* Contact form */

.contact {
  flex: 1 0 auto;
  padding-bottom: clamp(56px, 8vw, 104px);
}

.request {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px clamp(20px, 3vw, 40px);
  max-width: 880px;
  margin-top: clamp(28px, 4vw, 44px);
}

.field.wide,
.submit.wide {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
}

.opt {
  font-weight: 400;
  color: var(--on-sea-soft);
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--on-sea) 28%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--on-sea) 7%, transparent);
  color: var(--on-sea);
  font: inherit;
  line-height: 1.4;
  transition: border-color 160ms ease-out, background-color 160ms ease-out;
}

.field textarea {
  resize: vertical;
  min-height: 7.5em;
}

.field input::placeholder {
  color: color-mix(in srgb, var(--on-sea) 45%, transparent);
}

.field input:hover,
.field textarea:hover {
  border-color: color-mix(in srgb, var(--on-sea) 45%, transparent);
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 1px;
  border-color: transparent;
  background: color-mix(in srgb, var(--on-sea) 11%, transparent);
}

.hint {
  margin: 8px 0 0;
  font-size: 0.875rem;
  color: var(--on-sea-soft);
}

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

.submit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 4px;
}

.submit .hint {
  margin: 0;
}

.submit button {
  padding: 14px 28px;
  border: 0;
  border-radius: 999px;
  background: var(--sun);
  color: #0B2545;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms ease-out, transform 160ms ease-out;
}

.submit button:hover {
  background: #F9CD80;
}

.submit button:active {
  transform: scale(0.98);
}

.submit button:focus-visible {
  outline: 3px solid var(--on-sea);
  outline-offset: 3px;
}

.sea a {
  text-underline-offset: 0.2em;
}

.direct {
  margin: clamp(28px, 4vw, 40px) 0 0;
  max-width: 60ch;
}

@media (max-width: 640px) {
  .request {
    grid-template-columns: 1fr;
  }
}

/* Simple pages: privacy, sent, error */

.page {
  padding: clamp(40px, 8vh, 96px) var(--gutter) var(--section);
}

.page h1 {
  margin: 0 0 24px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 1.3rem + 3vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 96;
}

.page p {
  max-width: 62ch;
  margin: 0 0 16px;
}

.page .back {
  margin-top: 32px;
  font-weight: 600;
}

.page a {
  text-underline-offset: 0.2em;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px var(--gutter) 28px;
  background: var(--sea);
  font-size: 0.875rem;
  color: var(--on-sea-soft);
  border-top: 1px solid var(--line-sea);
}

.foot a {
  color: inherit;
  text-underline-offset: 0.2em;
}

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

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

section[id] {
  scroll-margin-top: 16px;
}
