/* Altschliffdiamanten.de – refresh draft (Dec 2026).
   Keeps the original site's character: grey ground, white Arial text,
   serif capitals for navigation and headings, Niko's drawings, the jewel masthead. */

:root {
  --ground-top: #3c3c3c;
  --ground-mid: #6d6b68;
  --charcoal: #363636;
  --ink: #f4f3f0;
  --soft: #e4e1dc;
  --faint: #cfcbc4;
  --line: rgb(255 255 255 / 18%);
  --panel: rgb(24 24 24 / 34%);
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --sans: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --frame: 74rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--charcoal);
  font: 16.5px/1.66 var(--sans);
  text-rendering: optimizeLegibility;
}

/* The approved warm-grey gradient follows the whole page and settles into
   the charcoal of the drawing strip at the bottom. */
.surface {
  background: linear-gradient(
    to bottom,
    #3c3c3c 0,
    #454442 10%,
    #5a5956 24%,
    #6a6865 38%,
    #706e6b 50%,
    #62615e 68%,
    #504f4d 85%,
    var(--charcoal) 100%
  );
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
}

.frame {
  width: min(100% - 2.5rem, var(--frame));
  margin-inline: auto;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: #fff; text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 0.8rem;
  background: #fff;
  color: #222;
}
.skip-link:focus { top: 1rem; }

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

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 1.6rem;
}

.site-header .logo { display: block; flex: none; }
.site-header .logo img { display: block; width: 15.5rem; height: auto; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 0.4rem;
  padding-top: 0.4rem;
  font: 0.8rem/1 var(--serif);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.site-nav a {
  padding: 0.45rem 0.65rem 0.4rem;
  text-decoration: none;
  color: var(--ink);
}
.site-nav a:hover { background: rgb(255 255 255 / 12%); }
.site-nav a[aria-current="page"] { background: #e7e5e1; color: #2e2e2e; }

/* Home: the large original artwork is the masthead, so the small logo is hidden. */
.page-home .site-header .logo { display: none; }
.page-home .site-header { justify-content: flex-end; }

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: normal;
  line-height: 1.25;
  color: #fff;
}

h1 { margin: 0 0 1.1rem; font-size: clamp(1.7rem, 2.6vw, 2.25rem); letter-spacing: 0.01em; }
h2 { margin: 0 0 0.8rem; font-size: 1.45rem; }
h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }

p { margin: 0 0 1rem; }

.eyebrow {
  margin: 0 0 0.5rem;
  font: 0.78rem/1.3 var(--serif);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--soft);
}

.lead { font-size: 1.08rem; color: #fff; }
.muted { color: var(--soft); }

.text-link {
  font-family: var(--serif);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.button {
  display: inline-block;
  padding: 0.7rem 1.25rem 0.65rem;
  border: 1px solid rgb(255 255 255 / 70%);
  color: #fff;
  font: 0.85rem/1.2 var(--serif);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
}
.button:hover { background: #e7e5e1; color: #2e2e2e; }
.button.solid { background: #e7e5e1; color: #2e2e2e; border-color: #e7e5e1; }
.button.solid:hover { background: #fff; }

/* ---------- Home ---------- */

.home-hero { position: relative; margin-top: 0.4rem; }

.home-hero .artwork { position: relative; z-index: 1; width: min(36rem, 100%); }
.home-hero .artwork img { display: block; width: 100%; height: auto; }

/* As on the original: the dark welcome panel starts under the wordmark and
   the jewel's drop hangs into it. */
.welcome {
  position: relative;
  z-index: 0;
  margin: -14.2rem 0 0 4rem;
  padding: clamp(1.6rem, 3vw, 2.4rem) clamp(1.5rem, 3vw, 2.6rem) clamp(1.6rem, 3vw, 2.4rem) 7rem;
  background: var(--panel);
  border-top: 1px solid var(--line);
}
.welcome > * { max-width: 44rem; }

.welcome h1 { font-size: clamp(1.5rem, 2.2vw, 1.95rem); }

.welcome ul { margin: 0 0 1.6rem; padding: 0; list-style: none; }
.welcome li {
  position: relative;
  padding-left: 1.3rem;
  margin-bottom: 0.55rem;
}
.welcome li::before { content: "–"; position: absolute; left: 0; color: var(--soft); }

.actions { display: flex; flex-wrap: wrap; gap: 0.8rem 1rem; align-items: center; }

.home-paths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2.5rem);
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.home-paths h2 { font-size: 1.25rem; }
.home-paths p { color: var(--soft); }

.home-piece {
  max-width: 40rem;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

/* ---------- Geschichte ---------- */

.essay-layout {
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 46rem);
  justify-content: space-between;
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: 2.2rem;
}

.essay-intro { margin-bottom: 2.4rem; }
.essay-intro h1 { margin-bottom: 0.6rem; }
.essay-intro .byline { color: var(--soft); font-size: 0.95rem; }

.chapters {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  font: 0.92rem/1.35 var(--serif);
}
.chapters summary { margin-bottom: 0.9rem; list-style: none; pointer-events: none; }
.chapters summary::-webkit-details-marker { display: none; }
.chapters ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.chapters a {
  display: block;
  padding: 0.38rem 0 0.38rem 0.95rem;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--soft);
  text-decoration: none;
}
.chapters a:hover { color: #fff; }
.chapters a.is-current { color: #fff; border-left-color: #fff; }

.essay { display: flow-root; text-shadow: 0 1px 1px rgb(0 0 0 / 25%); }
.essay p { hyphens: manual; }

.chapter { display: flow-root; scroll-margin-top: 1.5rem; }
.chapter + .chapter { margin-top: 2.6rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.chapter h2 .era {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--soft);
}

.fig { margin: 0.35rem 0 1.2rem; }
.fig.left { float: left; width: 44%; margin: 0.35rem 1.6rem 0.9rem 0; }
.fig.right { float: right; width: 44%; margin: 0.35rem 0 0.9rem 1.6rem; }
/* Pairs and full-width drawings share one width, so the column reads evenly.
   The narrow drawings were given extra paper (assets/geschichte/gerahmt/), never scaled. */
.fig.pair { display: flex; gap: 1rem; align-items: flex-start; max-width: 28.75rem; }
.fig.pair figure { margin: 0; flex: 1 1 0; min-width: 0; }
.fig.pair button, .fig.full button { width: 100%; }
.fig.pair img, .fig.full img { width: 100%; }
.fig.full figure { width: min(100%, 28.75rem); }
.fig figure { margin: 0; }

.fig button {
  display: block;
  padding: 0;
  border: 2px solid #222;
  background: #fff;
  cursor: zoom-in;
  max-width: 100%;
}
.fig img { display: block; max-width: 100%; height: auto; }
.fig.left button, .fig.right button, .fig.left img, .fig.right img { width: 100%; }
.fig figcaption { margin-top: 0.4rem; font-size: 0.84rem; line-height: 1.4; color: var(--soft); text-shadow: none; }

.essay-end {
  clear: both;
  margin-top: 3rem;
  padding: 1.6rem 1.8rem;
  background: var(--panel);
  border-top: 1px solid var(--line);
}
.essay-end p:last-child { margin-bottom: 0; }

/* Image viewer */
.viewer {
  max-width: min(94vw, 60rem);
  max-height: 94vh;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}
.viewer::backdrop { background: rgb(20 20 20 / 88%); }
.viewer img { display: block; max-width: 100%; max-height: 80vh; width: auto; height: auto; margin: 0 auto; }
.viewer p { margin: 0.7rem 0 0; text-align: center; font-size: 0.92rem; }
.viewer .close {
  display: block;
  margin: 0 0 0.6rem auto;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgb(255 255 255 / 60%);
  background: transparent;
  color: #fff;
  font: 0.8rem/1 var(--serif);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

/* ---------- Anfrage ---------- */

.page-intro { max-width: 46rem; margin: 2.2rem 0 2rem; }

.form-layout { max-width: 52rem; }

.enquiry {
  padding: clamp(1.3rem, 3vw, 2.2rem);
  background: var(--panel);
  border-top: 1px solid var(--line);
}

.enquiry fieldset { margin: 0 0 1.6rem; padding: 0; border: 0; min-width: 0; }
.enquiry legend, .enquiry .label {
  display: block;
  margin-bottom: 0.5rem;
  padding: 0;
  font: 1rem/1.3 var(--serif);
  color: #fff;
}
.enquiry .hint { font: 0.85rem/1.4 var(--sans); color: var(--faint); }

.field { margin-bottom: 1.15rem; }
.field-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }

.enquiry input[type="text"],
.enquiry input[type="email"],
.enquiry input[type="tel"],
.enquiry textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 0;
  background: rgb(255 255 255 / 92%);
  color: #222;
  font: 1rem/1.4 var(--sans);
}
.enquiry textarea { min-height: 7.5rem; resize: vertical; }

.intent { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.intent label, .chips label {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  cursor: pointer;
}
/* A choice should look chosen: white edge, brighter ground. */
.intent label:has(input:checked), .chips label:has(input:checked), .cuts label:has(input:checked) {
  border-color: #fff;
  background: rgb(255 255 255 / 16%);
  box-shadow: inset 0 0 0 1px #fff;
  color: #fff;
}

.cuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}
.cuts label {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  padding: 0.8rem 0.5rem 0.7rem;
  border: 1px solid var(--line);
  text-align: center;
  font-size: 0.86rem;
  line-height: 1.25;
  cursor: pointer;
}
.cuts .drawing {
  display: grid;
  place-items: center;
  width: 4.6rem;
  height: 4.2rem;
  background: #fff;
}
.cuts .drawing img { max-width: 4rem; max-height: 3.8rem; }
.cuts .drawing.empty { background: transparent; border: 1px dashed var(--line); color: var(--faint); font-size: 1.4rem; }
.cuts input { position: absolute; top: 0.5rem; left: 0.5rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips label { padding: 0.45rem 0.7rem; font-size: 0.92rem; }
/* Farbe and Reinheit read as a scale: five equal boxes in one row. */
.chips.scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.45rem; }
.chips.scale label { flex-direction: column; gap: 0.35rem; justify-content: center; padding: 0.55rem 0.2rem 0.5rem; text-align: center; white-space: nowrap; }
.enquiry .label .hint, .enquiry legend .hint { margin-left: 0.2rem; }

.enquiry input[type="checkbox"], .enquiry input[type="radio"] { accent-color: #e7e5e1; width: 1rem; height: 1rem; margin: 0; }

.form-section-title {
  margin: 2rem 0 1rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: 1.15rem;
}

.form-end { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: 1.6rem; }
.form-note { font-size: 0.85rem; color: var(--faint); margin: 0; }
.form-error { color: #ffd9d0; font-size: 0.9rem; margin: 0.4rem 0 0; }

.result { margin-top: 1.5rem; }
.result[hidden] { display: none; }
.result textarea { min-height: 14rem; font: 0.88rem/1.45 ui-monospace, Menlo, monospace; }


/* ---------- Legal ---------- */

.legal { max-width: 46rem; margin-top: 2.2rem; }
.legal section { margin-bottom: 2rem; }
.legal h2 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.legal address { font-style: normal; }
.legal ul { padding-left: 1.2rem; }

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

.site-footer { background: var(--charcoal); padding: 0 0 2.2rem; }

.cuts-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100% - 2rem, 80rem);
  margin: 0 auto;
}
.cuts-strip span { aspect-ratio: 792 / 141; background: url("/assets/footer.jpg") left center / 200% 100% no-repeat; }
.cuts-strip span + span { background-position: right center; }

.footer-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem 2rem;
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgb(255 255 255 / 12%);
  font-size: 0.86rem;
  color: var(--faint);
}
.footer-line nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.3rem; }
.footer-line a { color: var(--soft); }

/* ---------- Responsive ---------- */

@media (max-width: 64rem) {
  .essay-layout { grid-template-columns: minmax(0, 1fr); }
  .chapters { position: static; }
  .chapters summary { pointer-events: auto; cursor: pointer; display: inline-block; padding: 0.45rem 0.7rem; border: 1px solid var(--line); }
  .chapters summary::after { content: " ▾"; }
  .chapters[open] summary::after { content: " ▴"; }
  .chapters ol { display: flex; flex-wrap: wrap; gap: 0.3rem 0.4rem; border: 0; }
  .chapters a { padding: 0.35rem 0.6rem; border: 1px solid var(--line); margin: 0; }
}

@media (max-width: 52rem) {
  .home-hero { margin-top: 0.5rem; }
  .home-hero .artwork { width: min(30rem, 100%); }
  .welcome { margin: 0.5rem 0 0; padding: 1.5rem; }
  .home-paths { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 40rem) {
  body { font-size: 16px; }
  .site-header { flex-direction: column; gap: 0.8rem; padding-top: 1rem; }
  .site-header .logo img { width: 11rem; }
  .page-home .site-header .logo { display: none; }
  .site-nav { justify-content: flex-start; margin-left: -0.35rem; font-size: 0.68rem; letter-spacing: 0.02em; gap: 0.1rem; flex-wrap: wrap; }
  .site-nav a { padding: 0.5rem 0.32rem 0.45rem; white-space: nowrap; }
  .fig.left, .fig.right { float: none; width: 100%; margin: 0.35rem 0 1.2rem; }
  .fig.pair { gap: 0.8rem; }
  .page-intro { margin: 1.2rem 0 1.2rem; }
  .field-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .field-row.stone-size { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 0.8rem; }
  .field-row.stone-size .field:first-child { grid-column: 1 / -1; }
  .chips.scale label { font-size: 0.84rem; }
  .form-end .button { width: 100%; }
  .intent { grid-template-columns: minmax(0, 1fr); }
  .cuts { gap: 0.4rem; }
  .cuts label { font-size: 0.78rem; padding: 1.7rem 0.25rem 0.6rem; }
  .cuts-strip { grid-template-columns: minmax(0, 1fr); row-gap: 0.6rem; }
}

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

@media (min-width: 40.01rem) {
  html { scroll-behavior: smooth; }
}

/* ---------- Print ---------- */

@page { size: A4; margin: 14mm; }

@media print {
  body { background: #fff; color: #222; font-size: 10.5pt; }
  .surface { background: none; padding: 0; }
  .site-nav, .chapters, .skip-link, .actions, .form-end, .viewer { display: none !important; }
  .site-header .logo img { width: 9rem; filter: none; }
  h1, h2, h3, .lead, .eyebrow, .muted, .fig figcaption, .home-paths p, .footer-line { color: #222; }
  .essay { text-shadow: none; }
  .essay-layout { display: block; }
  .chapter + .chapter { border-color: #ccc; }
  .welcome, .essay-end, .enquiry { background: none; border-color: #ccc; }
  .fig, figure { break-inside: avoid; }
  h2 { break-after: avoid; }
  .site-footer { background: none; }
  .cuts-strip { width: 100%; }
}
