/* ============================================================
   Schreinerei Aeschlimann GmbH — design system
   Warm, craft-forward: paper grounds, espresso ink, brass accent.
   ============================================================ */

:root {
  --paper:      #f4eee3;
  --paper-deep: #ebe1d1;
  --card:       #fffaf1;
  --ink:        #271f18;
  --ink-2:      #463a2e;
  --muted:      #6c5f50;
  --brass:      #a8732f;
  --brass-2:    #c79a5a;
  --walnut:     #2f241b;
  --line:       rgba(39, 31, 24, 0.13);
  --line-soft:  rgba(39, 31, 24, 0.07);

  --shadow-sm: 0 1px 2px rgba(39, 31, 24, .06), 0 4px 16px rgba(39, 31, 24, .06);
  --shadow-md: 0 6px 18px rgba(39, 31, 24, .10), 0 24px 60px rgba(39, 31, 24, .12);

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --maxw: 1200px;
  --radius: 18px;
  --radius-lg: 26px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

::selection { background: var(--brass-2); color: var(--walnut); }

:focus-visible {
  outline: 2.5px solid var(--brass);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: .7rem 1rem;
  border-radius: 10px;
  font-size: .9rem;
  transition: top .2s ease;
}
.skip-link:focus { top: 16px; }

/* ---------- shared bits ---------- */
.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: .74rem;
  font-weight: 600;
  color: var(--brass);
  margin-bottom: .9rem;
}

.section-head {
  max-width: 60ch;
  margin: 0 auto clamp(2rem, 5vw, 3.4rem);
  text-align: center;
}
.section-head h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
.section-sub {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.06rem;
  max-inline-size: 56ch;
  margin-inline: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: .98rem;
  line-height: 1;
  padding: .95rem 1.5rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--walnut); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); background: rgba(39,31,24,.04); transform: translateY(-2px); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(244, 238, 227, 0.82);
  border-bottom: 1px solid var(--line-soft);
}
/* Solid bg once scrolled (no backdrop-filter: it would make the header a
   containing block for the fixed mobile drawer). */
.site-header.scrolled {
  background: var(--paper);
  box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(39,31,24,.05);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  min-width: 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 12px;
  background: linear-gradient(150deg, var(--walnut), #4a3826);
  color: var(--brass-2);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: .02em;
  box-shadow: inset 0 0 0 1px rgba(199,154,90,.25);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.06rem;
  color: var(--ink);
}
.brand-text small {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2rem);
}
.site-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: .98rem;
  color: var(--ink-2);
  position: relative;
  transition: color .15s ease;
}
.site-nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}
.site-nav a:not(.nav-cta):hover { color: var(--ink); }
.site-nav a:not(.nav-cta):hover::after { transform: scaleX(1); }
.nav-cta {
  background: var(--ink);
  color: var(--paper) !important;
  padding: .6rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--walnut); }

.menu-button { display: none; }
.menu-backdrop { display: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 4vw, 2.5rem) clamp(3rem, 7vw, 6rem);
  background:
    radial-gradient(120% 90% at 88% -10%, rgba(199,154,90,.20), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(168,115,47,.10), transparent 60%),
    var(--paper);
  overflow: clip;
}
.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}
.hero-copy { min-width: 0; }
.hero-copy h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.5rem);
  margin-bottom: 1.3rem;
  max-inline-size: 16ch;
}
.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  color: var(--ink-2);
  max-inline-size: 46ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: 2rem;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin: 2.6rem 0 0;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}
.hero-stats div { min-width: 0; }
.hero-stats dt {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
}
.hero-stats dd {
  margin: .25rem 0 0;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--ink);
}

.hero-figure {
  position: relative;
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  rotate: 1.2deg;
  background: var(--card);
}
.hero-figure img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 7 / 5; }
.hero-figure figcaption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  background: rgba(39,31,24,.72);
  color: var(--paper);
  font-size: .76rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .42rem .8rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

/* ============================================================
   STATEMENT
   ============================================================ */
.statement {
  padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1rem, 4vw, 2.5rem);
  background: var(--walnut);
  color: var(--paper);
}
.statement p {
  max-width: 30ch;
  margin: 0 auto;
  text-align: center;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.7rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.statement span { color: var(--brass-2); font-style: italic; }

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1rem, 4vw, 2.5rem);
  max-width: var(--maxw);
  margin: 0 auto;
}
.service-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.4vw, 1.8rem);
}
.service-card {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: clip;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.service-media { overflow: clip; }
.service-media img {
  width: 100%;
  aspect-ratio: 7 / 5;
  object-fit: cover;
  transition: transform .5s ease;
}
.service-card:hover .service-media img { transform: scale(1.05); }
.service-body { padding: 1.3rem 1.4rem 1.6rem; }
.service-body h3 {
  font-size: 1.4rem;
  margin-bottom: .5rem;
}
.service-body h3::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 2px;
  background: var(--brass);
  vertical-align: middle;
  margin-right: .55rem;
}
.service-body p { color: var(--muted); font-size: .98rem; }

/* ============================================================
   GALLERY
   ============================================================ */
.gallery {
  padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1rem, 4vw, 2.5rem);
  background: var(--paper-deep);
}
.gallery .section-head { color: var(--ink); }
.gallery-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 240px;
  gap: clamp(.7rem, 1.6vw, 1.1rem);
}
.g-item {
  margin: 0;
  border-radius: var(--radius);
  overflow: clip;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.g-item:hover img { transform: scale(1.05); }
.g-tall { grid-row: span 2; }
.g-wide { grid-column: span 2; }

/* ============================================================
   PORTRAIT
   ============================================================ */
.portrait {
  padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1rem, 4vw, 2.5rem);
}
.portrait-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.portrait-figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: clip;
  box-shadow: var(--shadow-md);
}
.portrait-figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.portrait-copy { min-width: 0; }
.portrait-copy h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin-bottom: 1.2rem; }
.portrait-copy p { color: var(--ink-2); margin-bottom: 1rem; max-inline-size: 56ch; }
.portrait-sign {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--brass);
  margin-top: 1.4rem !important;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1rem, 4vw, 2.5rem);
  background: var(--walnut);
  color: var(--paper);
}
.contact-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: stretch;
}
.contact-copy { min-width: 0; }
.contact .eyebrow { color: var(--brass-2); }
.contact-copy h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); color: var(--paper); }
.contact .section-sub { color: rgba(244,238,227,.78); margin-inline: 0; }

.contact-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
}
.contact-list li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(244,238,227,.16);
}
.c-label {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--brass-2);
  padding-top: .15rem;
}
.c-value { color: var(--paper); min-width: 0; }
.c-value a { color: var(--paper); text-decoration: none; border-bottom: 1px solid rgba(244,238,227,.4); }
.c-value a:hover { border-color: var(--brass-2); color: var(--brass-2); }

.contact-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.contact .btn-primary { background: var(--brass); color: var(--walnut); }
.contact .btn-primary:hover { background: var(--brass-2); }
.contact .btn-ghost { color: var(--paper); border-color: rgba(244,238,227,.4); }
.contact .btn-ghost:hover { border-color: var(--paper); background: rgba(244,238,227,.08); }

.contact-map {
  border-radius: var(--radius-lg);
  overflow: clip;
  box-shadow: var(--shadow-md);
  min-height: 360px;
  border: 1px solid rgba(244,238,227,.18);
}
.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
  display: block;
  filter: saturate(1.05) contrast(1.02);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: rgba(244,238,227,.8);
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1rem, 4vw, 2.5rem) 2rem;
}
.foot-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.foot-brand .brand-mark { margin-bottom: .9rem; }
.foot-name { font-family: var(--serif); font-size: 1.2rem; color: var(--paper); margin-bottom: .5rem; }
.foot-line { font-size: .92rem; line-height: 1.7; }
.foot-line a { color: var(--brass-2); text-decoration: none; }
.foot-line a:hover { text-decoration: underline; }

.foot-nav, .foot-legal { display: flex; flex-direction: column; gap: .65rem; }
.foot-nav a, .foot-legal a {
  text-decoration: none;
  color: rgba(244,238,227,.8);
  font-size: .94rem;
  width: max-content;
}
.foot-nav a:hover, .foot-legal a:hover { color: var(--brass-2); }

.foot-meta {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(244,238,227,.14);
  padding-top: 1.4rem;
  margin-top: .5rem;
  font-size: .82rem;
  color: rgba(244,238,227,.55);
}

/* ============================================================
   LEGAL PAGES
   ============================================================ */
.legal-main {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2rem) clamp(3rem, 7vw, 5rem);
}
.legal-article h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: .4rem; }
.legal-article h2 {
  font-size: 1.3rem;
  margin: 2.2rem 0 .6rem;
  color: var(--ink);
}
.legal-article p { color: var(--ink-2); margin-bottom: 1rem; max-inline-size: 70ch; }
.legal-article a { color: var(--brass); }
.legal-back { margin-top: 2.5rem; }
.legal-back a { text-decoration: none; font-weight: 600; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 920px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-figure { rotate: 0deg; order: -1; }
  .portrait-inner { grid-template-columns: 1fr; }
  .portrait-figure { order: -1; max-width: 520px; }
  .contact-inner { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  /* mobile nav */
  .menu-button {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 46px;
    padding: 0 11px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
    z-index: 130;
  }
  .menu-button span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--ink);
    border-radius: 2px;
    transition: transform .25s ease, opacity .2s ease;
  }
  body.nav-open .menu-button span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .menu-button span:nth-child(2) { opacity: 0; }
  body.nav-open .menu-button span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(39,31,24,.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
    z-index: 110;
  }
  body.nav-open .menu-backdrop { opacity: 1; visibility: visible; }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(82vw, 340px);
    height: 100dvh;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.6rem;
    padding: 2rem 2.2rem;
    background: var(--paper);
    box-shadow: -12px 0 40px rgba(39,31,24,.18);
    transform: translateX(100%);
    transition: transform .3s ease;
    z-index: 120;
  }
  body.nav-open .site-nav { transform: translateX(0); }
  .site-nav a { font-size: 1.3rem; font-family: var(--serif); color: var(--ink); }
  .nav-cta { font-family: var(--sans) !important; font-size: 1rem !important; }
}

@media (max-width: 560px) {
  .service-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .g-wide { grid-column: span 2; }
  .g-tall { grid-row: span 1; }
  .contact-list li { grid-template-columns: 1fr; gap: .25rem; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s ease;
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
