:root {
  --ink: #2b1e17;
  --brown: #66422c;
  --brown-deep: #382216;
  --copper: #bc7c4c;
  --cream: #f7f3eb;
  --sand: #e8dfd2;
  --paper: #fffdfa;
  --muted: #765f50;
  --line: #d9cabb;
  --accent-soft: #ecddcd;
  --visual-base: #b78158;
  --visual-alt: #846148;
  --visual-highlight: #a85f3a;
  --focus-ring: rgba(102, 66, 44, 0.16);
  --shadow: 0 18px 38px rgba(55, 34, 22, 0.11);
  --font-body: "Inter", sans-serif;
  --font-heading: "Playfair Display", serif;
  --hero-image: url("https://images.unsplash.com/photo-1616486338812-3dadae4b4ace?auto=format&fit=crop&w=1800&q=85");
}

body[data-theme="botanica"] {
  --ink: #20352d;
  --brown: #386650;
  --brown-deep: #142b24;
  --copper: #c77b48;
  --cream: #edf2ea;
  --sand: #dce8dc;
  --paper: #fcfdf9;
  --muted: #567064;
  --line: #c8d7ca;
  --accent-soft: #d8e8d9;
  --visual-base: #6e9b78;
  --visual-alt: #477565;
  --visual-highlight: #c77b48;
  --focus-ring: rgba(56, 102, 80, 0.2);
  --hero-image: url("https://images.unsplash.com/photo-1600210492486-724fe5c67fb0?auto=format&fit=crop&w=1800&q=85");
}

body[data-theme="noturno"] {
  --ink: #e8e5df;
  --brown: #d9a36a;
  --brown-deep: #151719;
  --copper: #dd7658;
  --cream: #23272a;
  --sand: #34393c;
  --paper: #1d2022;
  --muted: #b2b8b5;
  --line: #454b4d;
  --accent-soft: #38433f;
  --visual-base: #526b62;
  --visual-alt: #765a4d;
  --visual-highlight: #dd7658;
  --focus-ring: rgba(221, 118, 88, 0.22);
  --hero-image: url("https://images.unsplash.com/photo-1600607687920-4e2a09cf159d?auto=format&fit=crop&w=1800&q=85");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body { overflow-x: hidden; margin: 0; color: var(--ink); background: var(--paper); font-family: var(--font-body); line-height: 1.65; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.container { width: min(1120px, calc(100% - 3rem)); margin: 0 auto; }
.nav { position: fixed; z-index: 10; top: 0; width: 100%; border-bottom: 1px solid rgba(255, 253, 250, 0.18); background: color-mix(in srgb, var(--brown-deep) 92%, transparent); color: #fffaf3; backdrop-filter: blur(12px); }
.nav__inner { display: flex; min-height: 4.8rem; width: min(1200px, calc(100% - 3rem)); align-items: center; justify-content: space-between; margin: 0 auto; }
.nav__logo { display: flex; align-items: center; gap: 0.55rem; font-size: 0.92rem; white-space: nowrap; }
.nav__logo-mark { font-size: 1.4rem; }
.nav__logo-text strong { font-family: var(--font-heading); font-size: 1.12rem; }
.theme-switcher { display: flex; align-items: center; gap: 0.65rem; margin-left: auto; margin-right: 1.5rem; }
.theme-switcher__label { color: rgba(255, 250, 243, 0.72); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.theme-switcher__options { display: flex; gap: 0.35rem; }
.theme-option { width: 1.15rem; height: 1.15rem; padding: 0; border: 2px solid rgba(255, 255, 255, 0.48); border-radius: 50%; box-shadow: 0 0 0 0 transparent; transition: transform 180ms ease, box-shadow 180ms ease; }
.theme-option:hover { transform: scale(1.15); }
.theme-option[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--copper); }
.theme-option--atelier { background: #bc7c4c; }
.theme-option--botanica { background: #6e9b78; }
.theme-option--noturno { background: #dd7658; }
.nav__menu { display: flex; align-items: center; gap: 1.5rem; padding: 0; margin: 0; list-style: none; font-size: 0.86rem; }
.nav__menu a:not(.btn) { color: #f5e8da; }
.nav__menu a:not(.btn):hover { color: #fff; }
.nav__toggle { display: none; border: 0; background: transparent; }

.btn { display: inline-flex; min-height: 2.85rem; align-items: center; justify-content: center; padding: 0.65rem 1.15rem; border: 1px solid transparent; border-radius: 3px; font-size: 0.88rem; font-weight: 700; transition: background-color 180ms ease, color 180ms ease, transform 180ms ease; }
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--copper); color: #fff; }
.btn--primary:hover { background: color-mix(in srgb, var(--copper) 78%, var(--brown-deep)); }
.btn--ghost { border-color: rgba(255, 255, 255, 0.7); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--brown-deep); }
.btn--sm { min-height: 2.3rem; padding: 0.4rem 0.8rem; }
.btn--full { width: 100%; }
.btn:disabled { cursor: wait; opacity: 0.7; transform: none; }

.hero { position: relative; display: grid; min-height: 44rem; overflow: hidden; place-items: center; background: var(--brown-deep); color: #fffaf4; }
.hero__bg { position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--brown-deep) 92%, transparent), color-mix(in srgb, var(--brown) 55%, transparent)), repeating-linear-gradient(100deg, transparent 0 55px, rgba(255, 206, 147, 0.05) 57px 59px, transparent 61px 110px), var(--hero-image) center/cover; }
.hero__content { position: relative; padding: 9rem 0 5rem; }
.hero__badge, .tag { display: inline-flex; padding: 0.3rem 0.65rem; border-radius: 2px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.hero__badge { border: 1px solid rgba(255,255,255,.35); color: #f4d6b4; }
.hero__title { max-width: 760px; margin: 1rem 0; font-family: var(--font-heading); font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1.04; }
.hero__title em { color: var(--copper); font-weight: inherit; }
.hero__subtitle { max-width: 665px; color: #f1dfcf; font-size: 1.02rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 2.5rem; margin-top: 4rem; }
.stat { display: grid; gap: 0.1rem; }
.stat__num { font-family: var(--font-heading); font-size: 1.75rem; font-weight: 700; }
.stat__label { color: #dcc2aa; font-size: 0.77rem; }
.hero__scroll { position: absolute; bottom: 1.5rem; left: 50%; font-size: 1.6rem; transform: translateX(-50%); }

.section { padding: 6.5rem 0; }
.section--tint { background: var(--cream); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5rem; align-items: center; }
.grid-2--contact { align-items: start; }
.tag { margin-bottom: 0.8rem; background: var(--accent-soft); color: var(--brown); }
h2, h3 { font-family: var(--font-heading); line-height: 1.2; }
h2 { margin: 0 0 1.1rem; font-size: clamp(2rem, 3.5vw, 3.1rem); }
h3 { margin: 0 0 0.75rem; font-size: 1.35rem; }
p { margin: 0 0 1rem; }
.text-block > p { color: var(--muted); }
.check-list, .contact-list { display: grid; gap: 0.72rem; padding: 0; margin: 1.6rem 0 0; list-style: none; }
.check-list li::before { margin-right: 0.6rem; color: var(--copper); content: "✓"; font-weight: 700; }
.about-visual { display: grid; gap: 0.85rem; min-height: 22rem; align-content: center; padding: 2rem; background: var(--sand); }
.about-card { display: flex; gap: 1rem; align-items: center; padding: 1.1rem; background: var(--paper); box-shadow: var(--shadow); }
.about-card:nth-child(2) { margin-left: 2.3rem; }
.about-card:nth-child(3) { margin-left: 0.9rem; }
.about-card span { font-size: 1.75rem; }
.about-card small { display: block; color: var(--muted); font-size: 0.75rem; }
.section__head { max-width: 680px; margin: 0 auto 3.2rem; text-align: center; }
.section__head > p { color: var(--muted); }

.services-grid, .portfolio-grid, .quotes-grid { display: grid; gap: 1.3rem; }
.services-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.service-card { min-height: 16rem; padding: 1.45rem; border: 1px solid var(--line); background: var(--paper); }
.service-card--featured { border-top: 4px solid var(--copper); }
.service-card__icon { display: block; margin-bottom: 1.2rem; font-size: 2rem; }
.service-card p, .service-card small { color: var(--muted); font-size: 0.88rem; }
.service-card small { display: block; margin-top: 1.3rem; color: var(--brown); font-weight: 700; }
.service-card--loading, .service-card--error { grid-column: 1 / -1; min-height: auto; text-align: center; }
.service-card--error { color: #8f3330; }

.gamer-subsection { margin-top: 3.5rem; padding-top: 3rem; border-top: 1px solid var(--line); }
.gamer-subsection h3 { font-size: 1.7rem; }
.gamer-subsection > p { max-width: 560px; margin-bottom: 1.8rem; color: var(--muted); }
.gamer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.3rem; }
.gamer-features { display: grid; gap: 0.35rem; padding: 0; margin: 0.9rem 0 0; list-style: none; font-size: 0.82rem; color: var(--muted); }
.gamer-features li::before { margin-right: 0.4rem; color: var(--copper); content: "•"; }

.portfolio-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.work { min-width: 0; margin: 0; background: var(--cream); }
.work__img { display: grid; min-height: 12rem; place-items: center; background: var(--visual-base); color: #fff; font-size: 3.2rem; }
.work:nth-child(2n) .work__img { background: var(--visual-alt); }
.work:nth-child(3n) .work__img { background: var(--visual-highlight); }
.work figcaption { padding: 1rem; }
.work figcaption strong, .work figcaption small { display: block; }
.work figcaption small { margin-top: 0.3rem; color: var(--muted); font-size: 0.75rem; }
.quotes-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quote { margin: 0; padding: 1.7rem; border-left: 3px solid var(--copper); background: var(--paper); }
.quote p { font-family: var(--font-heading); font-size: 1.08rem; }
.quote footer { color: var(--muted); font-size: 0.8rem; }

.contact-info > p { color: var(--muted); }
.contact-list li { display: grid; grid-template-columns: 1.5rem 1fr; }
.contact-form { padding: 1.8rem; background: var(--cream); }
.field { display: grid; gap: 0.35rem; margin-bottom: 1rem; }
.field label { font-size: 0.82rem; font-weight: 700; }
.field input, .field textarea { width: 100%; padding: 0.75rem; border: 1px solid var(--line); border-radius: 2px; background: var(--paper); color: var(--ink); }
.field input:focus, .field textarea:focus { border-color: var(--brown); outline: 2px solid var(--focus-ring); }
.form-status { min-height: 1.4rem; margin: 0.8rem 0 0; font-size: 0.82rem; }
.form-status--success { color: #25643a; }
.form-status--error { color: #993934; }

body[data-theme="noturno"] .field input,
body[data-theme="noturno"] .field textarea,
body[data-theme="noturno"] .about-card,
body[data-theme="noturno"] .service-card,
body[data-theme="noturno"] .quote { color: var(--ink); }

.footer { padding: 3rem 0; background: var(--brown-deep); color: #eadaca; }
.footer__inner { display: grid; grid-template-columns: 1.5fr 1fr 1.4fr; gap: 2rem; align-items: start; }
.footer__brand { color: #fffaf4; }
.footer__inner p { margin: 0.45rem 0 0; color: #c9b09b; font-size: 0.8rem; }
.footer__links { display: grid; gap: 0.4rem; font-size: 0.82rem; }
.footer__copy { text-align: right; }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal--visible { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gamer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { gap: 2.5rem; }
}

@media (max-width: 720px) {
  .container, .nav__inner { width: min(100% - 2rem, 1120px); }
  .nav__logo { min-width: 0; overflow: hidden; }
  .nav__logo-text { overflow: hidden; text-overflow: ellipsis; }
  .nav__toggle { display: grid; gap: 4px; padding: 0.5rem; color: #fff; }
  .theme-switcher { margin-right: 0.6rem; }
  .theme-switcher__label { display: none; }
  .nav__toggle span { display: block; width: 1.4rem; height: 2px; background: currentColor; }
  .nav__menu { position: absolute; top: 4.8rem; right: 0; left: 0; display: none; padding: 1rem; background: var(--brown-deep); }
  .nav__menu--open { display: grid; }
  .hero { min-height: 42rem; }
  .hero__content { padding-top: 7rem; }
  .hero__stats { gap: 1.2rem; margin-top: 2.8rem; }
  .section { padding: 4.5rem 0; }
  .grid-2, .portfolio-grid, .quotes-grid, .footer__inner { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .gamer-grid { grid-template-columns: 1fr; }
  .about-card:nth-child(2), .about-card:nth-child(3) { margin-left: 0; }
  .footer__copy { text-align: left; }
}

@media (max-width: 340px) {
  .container, .nav__inner { width: min(calc(100vw - 1rem), 1120px); }
  .nav__logo-text { display: none; }
  .theme-switcher { margin-left: auto; margin-right: 0.2rem; }
  .theme-option { width: 1rem; height: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .btn { transition: none; }
}