/* Layout #6 "Overlap" from previews/. Rules it must follow: DESIGN-RULES.md. */

:root {
  --bg: #f2f0ea;
  --text: #1f2a25;
  --muted: #55605a;
  --card: #ffffff;
  --line: #e3e0d8;
  --field: #f8f7f3;
  --field-line: #e3e0d8;
  --accent: #1d3a2f;
  --on-accent: #ffffff;
  --error: #a3271b;
  --header: #1d3a2f;
  --header-muted: #b8c6bd;
  --logo: #e4d6b0;
  --about-heading: #1d3a2f;
  --about-bar: #c9b27a;
  --shadow: 0 30px 60px -40px rgba(20, 40, 30, 0.5);
  --body: "Work Sans", "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111814;
    --text: #e9ece8;
    --muted: #a9b3ad;
    --card: #19231e;
    --line: #2a3630;
    --field: #111814;
    --field-line: #34423b;
    --accent: #e4d6b0;
    --on-accent: #1d3a2f;
    --error: #f08a7a;
    --header: #183026;
    --about-heading: #e4d6b0;
    --about-bar: #8a7a52;
    --shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.8);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 4px; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 40px); }
.center { text-align: center; }

/* ---------- Header ---------- */

.top {
  background: var(--header);
  padding: clamp(56px, 9vw, 100px) 0 clamp(140px, 16vw, 190px);
}
.logo {
  display: block;
  width: min(100%, 440px);
  aspect-ratio: 1484 / 575;
  margin: 0 auto;
  background: var(--logo);
  -webkit-mask: url(logo.png) center / contain no-repeat;
          mask: url(logo.png) center / contain no-repeat;
}
.cta-row { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: center; }
.top .button { background: var(--logo); color: var(--header); }
.note { font-size: 0.92rem; color: var(--header-muted); }

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  font: 600 1rem/1 var(--body);
  padding: 15px 22px;
  border: 0;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { filter: brightness(1.1); }
.button[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Cards ---------- */

.float-card {
  background: var(--card);
  border-radius: 20px;
  padding: clamp(24px, 5vw, 52px);
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}
main .float-card:first-child { margin-top: clamp(-120px, -12vw, -90px); }

h2 { font: 600 clamp(1.5rem, 2.6vw, 1.9rem)/1.2 var(--body); letter-spacing: -0.01em; margin-bottom: 16px; }

.about-grid { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: 32px clamp(28px, 5vw, 64px); align-items: center; }
.photo { margin: 0; aspect-ratio: 1; overflow: hidden; border-radius: 16px; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
/* "About Me" stands apart from the bio: bigger, brand green, sand bar underneath. */
.about-copy h2 { font-size: clamp(1.9rem, 3.2vw, 2.4rem); color: var(--about-heading); margin-bottom: 22px; }
.about-copy h2::after { content: ""; display: block; width: 52px; height: 4px; margin-top: 12px; border-radius: 2px; background: var(--about-bar); }
.bio-lead { font-size: 1.2rem; line-height: 1.5; font-weight: 500; margin-bottom: 14px; }
.bio { color: var(--muted); }

.contact-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 28px clamp(28px, 5vw, 64px); align-items: start; }
.intro-text { color: var(--muted); }

/* ---------- Form ---------- */

.fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.span-2 { grid-column: 1 / -1; }
label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--muted); }
input, textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--field-line);
  border-radius: 6px;
  padding: 11px 12px;
}
input::placeholder { color: var(--muted); opacity: 0.8; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }
textarea { min-height: 130px; resize: vertical; }
[aria-invalid="true"] { border-color: var(--error); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.privacy { margin: 18px 0 8px; font-size: 0.88rem; line-height: 1.5; color: var(--muted); }
.form-status { min-height: 1.5em; margin-bottom: 10px; font-size: 0.92rem; font-weight: 500; color: var(--error); }

.success { padding: 12px 0; }
.success:focus { outline: none; }
.success h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: 8px; }
.success p { color: var(--muted); }

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

footer { font-size: 0.88rem; color: var(--muted); }
footer .wrap { display: flex; justify-content: center; gap: 6px 28px; padding-block: 28px; }

@media (max-width: 820px) {
  .about-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .photo { max-width: 200px; width: 100%; margin-inline: auto; }
}
@media (max-width: 560px) { .fields { grid-template-columns: minmax(0, 1fr); } }
