/* Links: a Carrd-style link page. Three themes via <html data-theme="moss|clay|night">. */
:root {
  --font-display: "Caprasimo", Georgia, serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --radius: 22px;
  --shell: 1160px;
}
:root, [data-theme="moss"] {
  --bg: #f7eedb;
  --dot: #e6d7b8;
  --surface: #fffaf0;
  --ink: #22301f;
  --muted: #55604c;
  --line: #22301f;
  --accent: #344637;
  --on-accent: #f7eedb;
  --pop: #c77a59;
  --soft: #d9e4b9;
  --on-soft: #22301f;
  --focus: #a14831;
}
[data-theme="clay"] {
  --bg: #f3dccb;
  --dot: #e5c3aa;
  --surface: #fcf2e8;
  --ink: #3a1f17;
  --muted: #6a4537;
  --line: #3a1f17;
  --accent: #a14831;
  --on-accent: #fff6ec;
  --pop: #344637;
  --soft: #f5d789;
  --on-soft: #3a1f17;
  --focus: #344637;
}
[data-theme="night"] {
  --bg: #1b231d;
  --dot: #2a362c;
  --surface: #253027;
  --ink: #f7eedb;
  --muted: #c9c4b0;
  --line: #f7eedb;
  --accent: #d9e4b9;
  --on-accent: #1b231d;
  --pop: #e5a481;
  --soft: #344637;
  --on-soft: #f7eedb;
  --focus: #f5d789;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1.6px, transparent 1.8px);
  background-size: 26px 26px;
  transition: background-color .35s ease, color .35s ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1.5px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.05; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--accent); color: var(--on-accent); padding: 12px 18px; border-radius: 999px; font-weight: 600; }
.skip:focus { top: 12px; }

/* Header */
.site-header { max-width: var(--shell); margin: 0 auto; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; position: relative; z-index: 20; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.35rem; text-decoration: none; min-height: 44px; }
.wordmark svg { width: 34px; height: 34px; flex: none; }
.nav-desktop { display: none; align-items: center; gap: 6px; }
.nav-desktop a, .nav-mobile a { text-decoration: none; font-weight: 600; padding: 10px 16px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; }
.nav-desktop a[aria-current="page"], .nav-mobile a[aria-current="page"] { background: var(--soft); color: var(--on-soft); }
.nav-desktop a:hover { background: var(--surface); }
.nav-mobile { position: relative; }
.nav-mobile summary { list-style: none; cursor: pointer; min-height: 44px; min-width: 44px; padding: 10px 18px; border: 2px solid var(--line); border-radius: 999px; font-weight: 600; background: var(--surface); display: inline-flex; align-items: center; gap: 8px; }
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.nav-mobile[open] summary::after { transform: translateY(2px) rotate(225deg); }
.nav-mobile ul { list-style: none; margin: 0; padding: 10px; position: absolute; right: 0; top: calc(100% + 8px); width: min(240px, calc(100vw - 40px)); background: var(--surface); border: 2px solid var(--line); border-radius: 18px; box-shadow: 5px 5px 0 var(--line); display: grid; gap: 4px; }
.nav-mobile li a { width: 100%; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; background: var(--accent); color: var(--on-accent); border: 2px solid var(--line); box-shadow: 4px 4px 0 var(--line); transition: transform .18s ease, box-shadow .18s ease; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--line); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }
.btn--ghost { background: var(--surface); color: var(--ink); }
.btn-arrow { font-size: 1.1em; line-height: 1; }

/* Page shell */
main { display: block; }
.shell { max-width: var(--shell); margin: 0 auto; padding: 0 20px; }

/* Profile (home) */
.profile-layout { max-width: var(--shell); margin: 0 auto; padding: 8px 20px 56px; display: grid; gap: 28px; }
.profile { text-align: center; display: grid; justify-items: center; gap: 14px; }
.avatar-frame { position: relative; width: min(220px, 62vw); }
.avatar-frame::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px dashed var(--pop); animation: spin 40s linear infinite; }
.avatar { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 3px solid var(--line); background: var(--soft); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 600; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--pop); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pop) 30%, transparent); }
.profile h1 { font-size: clamp(2.6rem, 11vw, 4.4rem); }
.role { font-weight: 600; color: var(--muted); }
.bio { max-width: 34ch; font-size: 1.0625rem; }
.socials { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.socials a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line); text-decoration: none; font-weight: 600; font-size: .9375rem; background: var(--surface); }
.socials a:hover { background: var(--soft); color: var(--on-soft); }

.themes { display: none; align-items: center; gap: 10px; margin-top: 6px; font-size: .875rem; color: var(--muted); }
.js .themes { display: flex; }
.themes-list { display: flex; gap: 6px; }
.swatch { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; display: grid; place-items: center; background: transparent; }
.swatch span { width: 26px; height: 26px; border-radius: 50%; display: block; }
.swatch--moss span { background: linear-gradient(135deg, #344637 50%, #d9e4b9 50%); }
.swatch--clay span { background: linear-gradient(135deg, #a14831 50%, #f5d789 50%); }
.swatch--night span { background: linear-gradient(135deg, #1b231d 50%, #e5a481 50%); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--line); }

.stack { display: grid; gap: 28px; width: 100%; max-width: 640px; margin: 0 auto; }

/* Featured card */
.featured { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: 6px 6px 0 var(--line); overflow: hidden; display: grid; }
.featured-media { position: relative; }
.featured-media .photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: 2px solid var(--line); }
[data-theme="clay"] .badge { color: #fff6ec; }
.badge { position: absolute; top: 14px; left: 14px; background: var(--pop); color: #1b231d; font-weight: 600; font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; border: 2px solid #1b231d; transform: rotate(-4deg); }
.featured-body { padding: 22px 22px 24px; display: grid; gap: 12px; }
.featured-body h2 { font-size: clamp(1.75rem, 6vw, 2.3rem); }
.featured-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 6px; }
.price { font-family: var(--font-display); font-size: 1.6rem; }
.price small { font-family: var(--font-body); font-size: .875rem; color: var(--muted); margin-left: 6px; }

/* Link groups */
.group { display: grid; gap: 12px; }
.group-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 4px; }
.group-head h2 { font-size: 1.5rem; }
.group-head p { white-space: nowrap; font-size: .875rem; color: var(--muted); font-weight: 600; }
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.link { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 14px; padding: 14px 18px 14px 14px; min-height: 76px; background: var(--surface); border: 2px solid var(--line); border-radius: 18px; text-decoration: none; box-shadow: 3px 3px 0 var(--line); transition: transform .18s ease, box-shadow .18s ease, background-color .18s; }
.link:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--line); background: color-mix(in srgb, var(--soft) 45%, var(--surface)); }
.link-glyph { width: 48px; height: 48px; border-radius: 14px; background: var(--soft); color: var(--on-soft); display: grid; place-items: center; font-family: var(--font-display); font-size: 1.3rem; }
.link-glyph svg { width: 24px; height: 24px; }
.link-text { display: grid; gap: 2px; min-width: 0; }
.link-title { font-weight: 600; font-size: 1.0625rem; line-height: 1.3; }
.link-desc { font-size: .9375rem; color: var(--muted); line-height: 1.45; }
.link-go { font-size: 1.25rem; transition: transform .18s ease; }
.link:hover .link-go { transform: translate(3px, -3px); }
.links--pair { grid-template-columns: 1fr; }

/* Newsletter / slot cards */
.card { background: var(--accent); color: var(--on-accent); border: 2px solid var(--line); border-radius: var(--radius); padding: 26px 22px; display: grid; gap: 14px; position: relative; overflow: hidden; }
.card h2, .card h3 { font-size: clamp(1.7rem, 6vw, 2.2rem); max-width: 16ch; }
.card a { color: inherit; font-weight: 600; }
.card .btn { background: var(--on-accent); color: var(--accent); border-color: var(--on-accent); box-shadow: 4px 4px 0 var(--pop); }
.card::after { content: ""; position: absolute; right: -64px; top: -64px; width: 150px; height: 150px; border-radius: 50%; border: 18px solid var(--pop); opacity: .9; }
.card > * { position: relative; z-index: 1; }
.card :focus-visible { outline-color: var(--on-accent); }
.slot { display: grid; gap: 14px; }
.slot p { max-width: 46ch; }

/* Form styles for when a Forms plugin is connected */
.pl-form { display: grid; gap: 12px; }
.pl-form label { font-weight: 600; font-size: .9375rem; }
.pl-form input, .pl-form textarea, .pl-form select { width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 14px; }
.pl-form textarea { min-height: 120px; resize: vertical; }
.pl-form .row { display: grid; gap: 6px; }
.pl-form button { justify-self: start; }
.pl-form .fine { font-size: .875rem; opacity: .85; }

/* End CTA */
.end-cta { text-align: center; display: grid; justify-items: center; gap: 14px; padding: 36px 20px 8px; }
.end-cta h2 { font-size: clamp(1.9rem, 7vw, 3rem); max-width: 18ch; }
.end-cta p { color: var(--muted); max-width: 40ch; }

/* About */
.about-hero { max-width: var(--shell); margin: 0 auto; padding: 12px 20px 40px; display: grid; gap: 28px; }
.eyebrow { font-weight: 600; font-size: .875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.about-hero h1 { font-size: clamp(2.4rem, 9vw, 4.8rem); max-width: 14ch; margin-top: 10px; }
.about-hero .lede { font-size: 1.125rem; max-width: 42ch; margin-top: 16px; }
.about-hero .btn { margin-top: 22px; }
.frame { border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 8px 8px 0 var(--line); background: var(--surface); }
.frame .photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.tilt { transform: rotate(1.5deg); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.steps li { background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: 20px; counter-increment: step; display: grid; gap: 6px; }
.steps li::before { content: "0" counter(step); font-family: var(--font-display); font-size: 2rem; color: var(--pop); line-height: 1; }
.steps h3 { font-size: 1.35rem; }
.section { max-width: var(--shell); margin: 0 auto; padding: 36px 20px; display: grid; gap: 20px; }
.split { display: grid; gap: 20px; }
.section > h2 { font-size: clamp(2rem, 7vw, 3rem); }
.facts { margin: 0; display: grid; gap: 0; border-top: 2px solid var(--line); }
.facts div { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 14px 0; border-bottom: 2px solid var(--line); }
.facts dt { font-weight: 600; font-size: .875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font-size: 1.0625rem; }
.quote { background: var(--soft); color: var(--on-soft); border-radius: var(--radius); padding: 28px 24px; border: 2px solid var(--line); margin: 0; }
.quote p { font-family: var(--font-display); font-size: clamp(1.35rem, 4.5vw, 1.8rem); line-height: 1.25; }
.quote footer { margin-top: 14px; font-weight: 600; font-size: .9375rem; }
.quote blockquote { margin: 0; }
.quote figcaption { margin-top: 16px; font-size: .9375rem; }
.rates { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rates li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 16px 18px; border: 2px dashed var(--line); border-radius: 16px; }
.rates strong { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; white-space: nowrap; }
.rates span { display: block; font-size: .9375rem; color: var(--muted); }

/* Error + prose */
.lost { max-width: 760px; margin: 0 auto; padding: 16px 20px 40px; text-align: center; display: grid; justify-items: center; gap: 16px; }
.lost .frame { width: 100%; max-width: 560px; }
.lost h1 { font-size: clamp(2.4rem, 10vw, 4.2rem); }
.lost-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.prose { max-width: 680px; margin: 0 auto; padding: 12px 20px 40px; }
.prose-card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: 6px 6px 0 var(--line); padding: 28px 22px; display: grid; gap: 16px; }
.prose h1 { font-size: clamp(2.2rem, 8vw, 3.4rem); }
.prose h2 { font-size: 1.5rem; margin-top: 10px; }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }

/* Footer */
.site-footer { margin-top: 40px; border-top: 2px solid var(--line); background: var(--surface); }
.footer-inner { max-width: var(--shell); margin: 0 auto; padding: 32px 20px 40px; display: grid; gap: 24px; }
.footer-name { font-family: var(--font-display); font-size: 1.8rem; }
.footer-inner address { font-style: normal; display: grid; gap: 4px; }
.footer-inner address a { min-height: 44px; display: inline-flex; align-items: center; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-links a { min-height: 44px; display: inline-flex; align-items: center; }
.footer-small { font-size: .875rem; color: var(--muted); }

@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 720px) {
  .nav-desktop { display: flex; }
  .nav-mobile { display: none; }
  .links--pair { grid-template-columns: 1fr 1fr; }
  .links--pair .link { grid-template-columns: 48px 1fr; }
  .links--pair .link-go { display: none; }
  .featured { grid-template-columns: 1fr 1fr; }
  .featured-media .photo { height: 100%; aspect-ratio: auto; min-height: 320px; border-bottom: 0; border-right: 2px solid var(--line); object-fit: contain; background: #edd7b7; }
  .featured-body { align-content: center; padding: 28px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .facts div { grid-template-columns: 180px 1fr; gap: 20px; }
  .footer-inner { grid-template-columns: 1.3fr 1fr 1fr; align-items: start; }
  .prose-card { padding: 40px; }
}
@media (min-width: 1000px) {
  .profile-layout { grid-template-columns: minmax(320px, 400px) 1fr; gap: 64px; align-items: start; padding-top: 24px; }
  .profile { position: sticky; top: 24px; text-align: left; justify-items: start; background: var(--surface); border: 2px solid var(--line); border-radius: 28px; padding: 32px; box-shadow: 8px 8px 0 var(--line); }
  .profile .socials { justify-content: flex-start; }
  .avatar-frame { width: 180px; }
  .profile h1 { font-size: 3.6rem; }
  .stack { max-width: none; margin: 0; }
  .featured { grid-template-columns: 1.15fr 1fr; }
  .about-hero { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 56px; padding-top: 40px; padding-bottom: 64px; }
  .split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
  .end-cta { padding-top: 64px; }
}

@media (max-width: 719px) {
  .avatar-frame { width: 148px; }
  .profile { gap: 10px; }
  .bio { font-size: 1rem; line-height: 1.5; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .btn:hover, .link:hover, .link:hover .link-go { transform: none; }
}

@media print {
  body { background: #fff; color: #000; }
  .site-header, .themes, .card, .end-cta { display: none; }
}
