/* Visual Writing (At the Garden): single-page landing site */

@font-face {
  font-family: "Kaushan Script";
  src: url("/assets/fonts/kaushan-script.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("/assets/fonts/open-sans-var.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Merriweather";
  src: url("/assets/fonts/merriweather-var.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --panel: #222;
  --panel-deep: #1a1a1a;
  --rose: #d9465a;
  --peach: #fdc692;
  --text: #f4f1ee;
  --muted: #bdb7b2;
  --script: "Kaushan Script", "Brush Script MT", cursive;
  --sans: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Merriweather", Georgia, "Times New Roman", serif;
  --gutter: clamp(16px, 5vw, 56px);
}

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

html {
  background: var(--panel);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--panel);
  color: var(--text);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Mobile first: artwork on top, panel below */
.layout {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.art {
  margin: 0;
  background: #e8a9ae;
  overflow: hidden;
}
.art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2037 / 1152;
  object-fit: cover;
  object-position: 20% 50%;
}

.panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-deep) 100%);
}

.panel-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding:
    clamp(36px, 7vh, 64px)
    max(var(--gutter), env(safe-area-inset-right))
    clamp(24px, 5vh, 48px)
    max(var(--gutter), env(safe-area-inset-left));
}

/* Desktop and tablet landscape: side-by-side split */
@media (min-width: 960px) {
  .layout { flex-direction: row; }
  .art {
    position: sticky;
    top: 0;
    flex: 0 0 50%;
    height: 100vh;
    height: 100svh;
  }
  .art picture, .art img { height: 100%; }
  .art img { aspect-ratio: auto; object-position: 52% 50%; }
  .panel { flex: 0 0 50%; min-height: 100vh; min-height: 100svh; }
}

/* Very wide screens: give the artwork a bit more room */
@media (min-width: 1600px) {
  .art { flex-basis: 56%; }
  .panel { flex-basis: 44%; }
}

.home-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--peach);
  text-decoration: none;
  border-radius: 12px;
  padding: 4px 8px;
  -webkit-tap-highlight-color: transparent;
}
.emblem {
  display: block;
  width: clamp(112px, 30vw, 160px);
  height: auto;
  transition: transform .4s ease;
}
.home-link:hover .emblem { transform: rotate(-6deg) scale(1.03); }
.home-label {
  font-size: .9375rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.home-link:hover .home-label { text-decoration: underline; text-underline-offset: 4px; }
.home-link:focus-visible { outline: 2px solid var(--peach); outline-offset: 4px; }

.title {
  margin: clamp(18px, 3.5vh, 30px) 0 0;
  font: 400 clamp(2.6rem, 9vw, 4rem)/1.1 var(--script);
  color: #fff;
  text-wrap: balance;
}

.subtitle {
  max-width: 30rem;
  margin: 8px 0 0;
  font-size: clamp(1.0625rem, 2.6vw, 1.3125rem);
  font-weight: 300;
  line-height: 1.45;
  color: var(--muted);
  text-wrap: balance;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: clamp(22px, 4vh, 34px);
  padding: 10px 30px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font: 400 1rem/1.2 var(--serif);
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn em {
  font-family: var(--sans);
  font-style: italic;
  font-weight: 400;
}
.btn strong {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: .02em;
}
.btn:hover {
  background: var(--peach);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .4);
}
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--peach); outline-offset: 3px; }

.social {
  display: flex;
  gap: 14px;
  list-style: none;
  margin: clamp(22px, 4vh, 34px) 0 0;
  padding: 0;
}
.social a {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.social a:hover { background: #fff; color: #222; transform: translateY(-2px); }
.social a:focus-visible { outline: 2px solid var(--peach); outline-offset: 3px; }
.social svg { width: 26px; height: 21px; fill: currentColor; }

.footer {
  padding: 16px var(--gutter) max(20px, env(safe-area-inset-bottom));
  text-align: center;
  font-size: .8125rem;
  color: #8e8883;
}
.footer p { margin: 0; }
.footer a {
  color: #8e8883;
  text-decoration-color: rgba(142, 136, 131, .45);
  text-underline-offset: 3px;
}
.footer a:hover { color: var(--peach); }
.footer a:focus-visible { outline: 2px solid var(--peach); outline-offset: 2px; border-radius: 2px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .emblem, .btn, .social a { transition: none; }
  .home-link:hover .emblem, .btn:hover, .social a:hover { transform: none; }
}
