@font-face {
  font-family: "PV Adventor";
  src: url(fonts/pv-adventor-regular.woff2) format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PV Adventor";
  src: url(fonts/pv-adventor-bold.woff2) format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #E5EBE9;
  --fg: #1D1D1B;
  --muted: #535E5C;
  --line: #C9D3D0;
  --accent: #107771;
  --link: #0D6661;
  --on-link: #FFFFFF;
  --card: #FFFFFF;
  --card-fg: #1D1D1B;
  --card-muted: #5A5B5E;
  --card-edge: rgb(29 29 27 / .06);
  --card-shadow: 0 1px 2px rgb(16 52 49 / .14), 0 24px 48px -16px rgb(16 52 49 / .38);
  --grad: linear-gradient(100deg, #107771 0%, #FCC303 100%);
  --ease: cubic-bezier(.77, 0, .175, 1);
  --font: "PV Adventor", "URW Gothic", "Century Gothic", "Avenir Next", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141817;
    --fg: #EEF0EF;
    --muted: #A3ACAA;
    --line: #2B3231;
    --accent: #FCC303;
    --link: #FCC303;
    --on-link: #1D1D1B;
    --card: #1D1D1B;
    --card-fg: #F3F3EF;
    --card-muted: #AEAFB1;
    --card-edge: rgb(255 255 255 / .09);
    --card-shadow: 0 1px 2px rgb(0 0 0 / .5), 0 28px 56px -18px rgb(0 0 0 / .85);
  }
}

*, *::before, *::after { box-sizing: border-box; }
::selection { background: #FCC303; color: #1D1D1B; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }

/* Page frame. cqi resolves against .page, so the horizontal gutter sits on the children
   (margin-inline): .page's content box stays the full width, as in the approved mockup. */
.page {
  container-type: inline-size;
  max-width: 1180px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 5cqi, 44px);
}
.page > header, .page > main, .page > footer { margin-inline: clamp(24px, 6cqi, 64px); min-width: 0; }
.page > header { margin-top: clamp(24px, 6cqi, 64px); }
.page > footer { margin-bottom: clamp(24px, 6cqi, 64px); }
.page > main { flex: 1; }

header a { display: inline-block; line-height: 0; }
header img { display: block; width: clamp(110px, 14cqi, 158px); height: auto; }

/* Start page */
main:has(> .cards) {
  display: grid;
  gap: clamp(36px, 6cqi, 56px);
  align-items: center;
}
@container (min-width: 760px) {
  main:has(> .cards) { grid-template-columns: 1fr 1.1fr; }
}
.copy { display: grid; gap: clamp(16px, 2.4cqi, 24px); min-width: 0; }
h1 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(34px, 4.7cqi, 62px);
  line-height: 1.02;
  letter-spacing: -.015em;
  text-wrap: balance;
}
h1 span { display: block; color: var(--accent); }
.copy p {
  margin: 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: clamp(15px, 1.5cqi, 18px);
  line-height: 1.6;
  text-wrap: pretty;
}

.cards {
  position: relative;
  container-type: inline-size;
  width: min(86%, 470px);
  aspect-ratio: 85 / 55;
  justify-self: center;
  margin-block: 6% 8%;
}
.card { position: absolute; inset: 0; border-radius: 3.4cqi; }
.card--back {
  background: var(--grad);
  rotate: -7deg;
  translate: -7% -11%;
  display: grid;
  place-items: center;
  box-shadow: var(--card-shadow);
}
.card--back img, .face--logo img { width: 36%; height: auto; }
.card-slot { position: absolute; inset: 0; rotate: 3deg; translate: 4% 9%; perspective: 1100px; }
.flip, .flip__inner { width: 100%; height: 100%; transform-style: preserve-3d; }
.flip { animation: turn 1.1s var(--ease) .7s both; }
@keyframes turn { from { transform: rotateY(0); } to { transform: rotateY(180deg); } }
.flip__inner { position: relative; transition: transform .5s var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .cards:not(:focus-within) .card--back:hover ~ .card-slot .flip__inner { transform: rotateY(180deg); }
}
/* Keyboard focus on the card (the e-mail link) shows the contact face at once, even during the first turn. */
.cards:focus-within .flip { animation-delay: 0s; animation-duration: 0s; }

.face {
  position: absolute;
  inset: 0;
  border-radius: 3.4cqi;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: var(--card-shadow);
}
.face--logo { background: var(--grad); display: grid; place-items: center; }
.face--info {
  transform: rotateY(180deg);
  background: var(--card);
  color: var(--card-fg);
  box-shadow: var(--card-shadow), inset 0 0 0 1px var(--card-edge);
  padding: 7% 8%;
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.strip { position: absolute; inset: 0 0 auto 0; height: 1.6cqi; background: var(--grad); border-radius: 3.4cqi 3.4cqi 0 0; }
.face--info picture { display: block; width: 30%; }
.face--info picture img { display: block; width: 100%; height: auto; }
address {
  display: grid;
  gap: .25em;
  font-style: normal;
  font-size: clamp(11px, 3.7cqi, 16px);
  line-height: 1.35;
  color: var(--card-muted);
}
address strong { color: var(--card-fg); font-weight: 700; }
address a { color: var(--accent); }

/* Footer */
footer {
  display: grid;
  gap: 14px;
  justify-items: start;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
@container (min-width: 720px) {
  footer { grid-template-columns: 1fr auto; align-items: center; }
}
footer nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
footer nav a { display: inline-block; padding-block: 12px; margin-block: -12px; }

/* Text pages (contact, thank-you, legal) */
.prose { max-width: 65ch; }
.prose h1, .prose h2, .prose h3 { font-weight: 700; text-wrap: balance; }
.prose h1 { font-size: clamp(30px, 4cqi, 44px); margin: 0 0 .6em; }
.prose h2 { font-size: clamp(20px, 2.4cqi, 24px); line-height: 1.2; margin: 1.8em 0 .5em; }
.prose h3 { font-size: 17px; line-height: 1.3; margin: 1.4em 0 .4em; }
.prose p, .prose ul, .prose ol, .prose address { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose address { display: block; font-size: inherit; line-height: inherit; color: inherit; }
.prose address a { color: var(--link); }

@media (prefers-reduced-motion: reduce) {
  .flip { animation: none; transform: rotateY(180deg); }
  .flip__inner { transition: none; }
  .cards:not(:focus-within) .card--back:hover ~ .card-slot .flip__inner { transform: none; }
}

/* Contact form */
form { display: grid; gap: 6px; margin-top: 28px; }
form label { font-weight: 700; margin-top: 12px; }
form label:first-child { margin-top: 0; }
form input:not([type=hidden]), form textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font: inherit;
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}
form textarea { resize: vertical; min-height: 12em; }
form input:focus-visible, form textarea:focus-visible, form button:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; }
form .note { margin: 14px 0 6px; color: var(--muted); font-size: 14px; line-height: 1.55; }
form button {
  justify-self: start;
  min-height: 48px;
  padding: 0 28px;
  font: inherit;
  font-weight: 700;
  color: var(--on-link);
  background: var(--link);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
form button:hover { filter: brightness(1.08); }

a[href^="mailto:"] { white-space: nowrap; }

@media (forced-colors: active) {
  .card--back, .face--logo, .strip { forced-color-adjust: none; }
  .face--info { border: 1px solid CanvasText; }
}
