@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600&family=Geist:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --background: #101b2b;
  --text: #fff6ea;
  --muted: #d2dbe6;
  --line: #d7e4f237;
  --accent: #f3bf91;
  --haze: #5f819653;
  --surface: linear-gradient(140deg, #24374be8, #111c2bf5 75%);
  --shadow: 0 20px 65px #070d1880, inset 0 1px #ffeed014;
  --display: "Cormorant Garamond", Georgia, serif;
}

* { box-sizing: border-box; }
html { background: var(--background); }
body {
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 400 16px/1.65 Geist, "Segoe UI", sans-serif;
}
body::before, body::after {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
}
body::before {
  z-index: -2;
  background: url("/images/journey/cloud-horizon.webp?v=1") center / cover;
  scale: 1.12;
  transform: translate3d(var(--cloud-x, 0px), var(--cloud-y, 0px), 0);
  transition: transform 650ms cubic-bezier(.2, .7, .3, 1);
  animation: cloud-drift 26s ease-in-out infinite alternate;
}
body::after {
  z-index: -1;
  background:
    radial-gradient(ellipse at 88% 20%, var(--haze), transparent 57%),
    linear-gradient(108deg, #0d192aef 0%, #102033d1 45%, #182d4060 100%),
    linear-gradient(0deg, #0b1523 1%, #0b1523a3 39%, #14243411 81%);
}
@keyframes cloud-drift {
  from { translate: -10px 3px; scale: 1.12; }
  to { translate: 12px -5px; scale: 1.19; }
}
.page-projects { --haze: #a56c4878; }
.page-contact { --haze: #3e796e87; }
.page-about { --haze: #686c9b86; }

main { flex: 1; padding-bottom: clamp(44px, 7vw, 78px); }
a { color: var(--accent); text-underline-offset: .19em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.wrap { width: min(1080px, calc(100% - 48px)); margin-inline: auto; }
.skip-link {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  padding: 9px 14px;
  background: var(--text);
  color: var(--background);
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }
.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  min-height: 82px;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
}
.masthead a { color: var(--text); text-decoration: none; }
.masthead a:hover, .masthead [aria-current="page"] { color: var(--accent); }
.wordmark { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -.025em; }
.wordmark img { display: block; border-radius: 8px; box-shadow: 0 0 0 1px var(--line); }
.masthead nav { display: flex; flex-wrap: wrap; gap: 4px; font-size: 14px; font-weight: 500; }
.masthead nav a { display: inline-flex; align-items: center; min-height: 42px; padding-inline: 12px; border: 1px solid transparent; border-radius: 999px; }
.masthead [aria-current="page"] { border-color: #f3bf915e; background: #142436bd; }
.intro { padding: clamp(49px, 7.2vw, 92px) 0 clamp(29px, 4vw, 49px); }
.intro h1 {
  max-width: 15ch;
  margin: 0;
  font: 600 clamp(56px, 9vw, 118px)/.94 var(--display);
  letter-spacing: -.057em;
  text-shadow: 0 4px 30px #08101b88;
  text-wrap: balance;
}
.home-intro h1 { max-width: 13ch; }
.intro p {
  max-width: 52ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
}
.intro .location { margin: 0 0 12px; font-size: 13px; }
.intro .text-action { display: inline-block; margin-top: 16px; font-weight: 600; }
.block, .contact-form {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.block { max-width: 780px; padding: clamp(21px, 3.4vw, 39px); scroll-margin-top: 20px; }
.block + .block { margin-top: 17px; }
.block h2 { margin: 0 0 13px; font-size: clamp(21px, 3vw, 30px); font-weight: 600; letter-spacing: -.04em; line-height: 1.25; }
.block p { max-width: 60ch; margin: 8px 0 0; color: var(--muted); }
.block ul { margin: 11px 0 0; padding-inline-start: 21px; }
.block > a { display: inline-block; margin-top: 12px; }
.block :is(.service-list, .history) { list-style: none; padding: 0; margin: 0; }
.project-card { display: grid; max-width: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1.28fr); align-items: center; gap: clamp(22px, 5vw, 60px); }
.project-copy h2 { max-width: 13ch; font: 600 clamp(34px, 4vw, 57px)/.98 var(--display); text-wrap: balance; }
.project-preview { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 38px #050d1890; }
.project-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 15px; margin-top: 18px; font-size: 14px; font-weight: 600; }
.project-actions a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.project-demo, .contact-form button { padding-inline: 17px; border-radius: 999px; background: var(--accent); color: #20170f; text-decoration: none; }
.project-demo:hover, .contact-form button:hover { background: #ffdbc0; }
.service-list li, .history li { padding: 11px 0; }
.service-list li + li, .history li + li { border-top: 1px solid var(--line); }
.service-list a { color: var(--text); font-weight: 600; }
.service-list p, .history p { margin: 0; }
.history .date { font-size: 13px; }
.history h3 { margin: 2px 0; font-size: 17px; font-weight: 600; }
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 16px;
  padding-block: 20px 29px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer p { margin: 0; }
.footer-brand { display: flex; align-items: center; gap: 8px; }

.page-contact main {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-content: start;
  align-items: start;
  gap: clamp(24px, 5vw, 66px);
  padding-top: clamp(49px, 7.2vw, 92px);
}
.contact-intro { padding: 0; }
.contact-intro a { overflow-wrap: anywhere; }
.contact-form { position: relative; display: grid; gap: 17px; padding: clamp(19px, 3.1vw, 36px); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field { display: grid; min-width: 0; gap: 4px; }
.field label { font-size: 14px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #71839a;
  border-radius: 7px;
  color: var(--text);
  background: #111e30;
}
.field textarea { resize: vertical; }
.field :is(input, textarea)::placeholder { color: #a7b6c7; opacity: 1; }
.contact-form details { border-top: 1px solid var(--line); }
.contact-form summary { width: fit-content; padding-block: 8px; color: var(--accent); cursor: pointer; }
.optional-fields { display: grid; gap: 12px; padding-top: 5px; }
.contact-form button {
  width: fit-content;
  min-height: 44px;
  padding-block: 8px;
  border: 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.contact-form button:disabled { opacity: .6; cursor: progress; }
.contact-form p, .field-hint, .field-help { margin: 0; color: var(--muted); font-size: 13px; }
.form-status:empty { display: none; }
.form-status.is-error { color: #ffb4a4; }
.form-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

@media (max-width: 700px) {
  .page-contact main, .project-card { grid-template-columns: 1fr; }
  .project-preview { grid-row: 1; }
}

@media (max-width: 450px) {
  .wrap { width: calc(100% - 32px); }
  .masthead { column-gap: 12px; }
  .masthead nav { gap: 2px; }
  .masthead nav a { padding-inline: 8px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; transition: none; transform: none; }
}

@media print {
  :root { color-scheme: light; --background: #fff; --text: #171717; --muted: #343434; --line: #ccc; --accent: #352318; }
  body::before, body::after { display: none; }
  .intro { padding: 22px 0 16px; }
  .intro h1 { text-shadow: none; font-size: 48pt; }
  .block, .contact-form { background: none; box-shadow: none; break-inside: avoid; }
}
