/* Duxby Diamonds - base styles. Tokens first so new pages inherit the look. */
:root {
  --ice: #f2f6fa;
  --frost: #e1eaf2;
  --steel: #6f8396;
  --deep: #12263a;
  --abyss: #0a1826;
  --spark: #2f7fb5;
  --white: #ffffff;

  --serif: "Newsreader", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --max: 1120px;
  --pad: clamp(1.25rem, 5vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--deep);
  background: var(--ice);
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--spark); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0 0 .6em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); letter-spacing: -0.01em; }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1em; max-width: 62ch; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem var(--pad);
  background: rgba(242, 246, 250, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--frost);
}
.brand { font-family: var(--serif); font-size: 1.5rem; text-decoration: none; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a { text-decoration: none; font-weight: 500; font-size: .98rem; }
.nav a:hover { color: var(--spark); }
.nav .nav-cta { background: var(--deep); color: var(--white); padding: .55rem 1.1rem; border-radius: 2px; }
.nav .nav-cta:hover { background: var(--spark); color: var(--white); }
.nav-toggle { display: none; font: inherit; font-weight: 500; background: none; border: 1px solid var(--deep); padding: .4rem .9rem; cursor: pointer; }

/* Buttons */
.btn { display: inline-block; font: inherit; font-weight: 600; text-decoration: none; padding: .85rem 1.6rem; border: 1px solid transparent; border-radius: 2px; cursor: pointer; }
.btn-primary { background: var(--deep); color: var(--white); }
.btn-primary:hover { background: var(--spark); }
.btn-quiet { border-color: var(--deep); }
.btn-quiet:hover { background: var(--frost); }

/* Hero */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--pad);
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.lead { font-size: 1.2rem; color: var(--steel); color: #41566a; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.75rem; }

.gem { width: 100%; max-width: 440px; justify-self: center; filter: drop-shadow(0 24px 40px rgba(18, 38, 58, .22)); }
.gem polygon { stroke: rgba(255, 255, 255, .55); stroke-width: 1; stroke-linejoin: round; }
.gem .a0 { fill: #cfe3f2; }
.gem .a1 { fill: #9fc4de; }
.gem .b0 { fill: #7fb0d2; }
.gem .b1 { fill: #e9f3fa; }
.gem .table { fill: #f7fbfe; }
/* One slow glint: the memorable moment on the page */
.gem .b1 { animation: glint 6s ease-in-out infinite; }
.gem .b1:nth-child(4n) { animation-delay: 1.5s; }
.gem .b1:nth-child(8n) { animation-delay: 3s; }
@keyframes glint { 0%, 70%, 100% { fill: #e9f3fa; } 85% { fill: #ffffff; } }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) var(--pad); }
.section > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.section-head { margin-bottom: 2.5rem; }
.section-head p { color: #41566a; }
.section-tint { background: var(--frost); }

/* Services: ruled rows, not cards */
.services { list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; border-top: 1px solid var(--steel); }
.services > li {
  display: grid; grid-template-columns: 1fr 2fr; gap: 1rem 3rem;
  padding: 1.75rem 0; border-bottom: 1px solid var(--steel);
}
.services h3, .services p { margin: 0; }

/* Process: a real sequence, so numbered */
.steps { list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; counter-reset: step; }
.steps li { counter-increment: step; border-top: 3px solid var(--deep); padding-top: 1rem; }
.steps li::before { content: counter(step); font-family: var(--serif); font-size: 1.1rem; color: var(--spark); }
.steps h3 { margin: .2em 0 .3em; }
.steps p { margin: 0; color: #41566a; }

/* About */
.about { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; }
.about > * { max-width: none; margin: 0; }
.photo-slot { margin: 0; }
.photo-slot svg { width: 100%; height: auto; }
.photo-slot rect { fill: var(--frost); }
.photo-slot path { fill: none; stroke: var(--steel); stroke-width: 2; stroke-linejoin: round; }
.photo-slot figcaption { font-size: .85rem; color: var(--steel); margin-top: .5rem; }

/* Contact */
.section-dark { background: var(--abyss); color: var(--ice); }
.section-dark a { color: var(--ice); }
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.contact-details { line-height: 1.9; }
.form { display: grid; gap: 1.1rem; }
.form label { display: grid; gap: .35rem; font-weight: 500; font-size: .95rem; }
.form input, .form select, .form textarea {
  font: inherit; color: var(--deep); background: var(--ice);
  border: 1px solid transparent; border-radius: 2px; padding: .75rem .85rem; width: 100%;
}
.form .btn-primary { background: var(--spark); justify-self: start; }
.form .btn-primary:hover { background: #4a9bd0; }
.form-status { margin: 0; min-height: 1.5em; color: #9fc4de; }

/* Footer */
.site-footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  padding: 1.5rem var(--pad); font-size: .9rem; color: var(--steel);
}

/* Responsive */
@media (max-width: 860px) {
  .hero, .about, .contact-wrap { grid-template-columns: 1fr; }
  .gem { max-width: 320px; order: -1; }
  .services li { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ice); border-bottom: 1px solid var(--frost); padding: .5rem var(--pad) 1rem;
  }
  .nav.open { display: flex; }
  .nav a { padding: .75rem 0; }
  .nav .nav-cta { text-align: center; margin-top: .5rem; }
}
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gem .b1 { animation: none; }
}

/* ---- Multi-page additions ---- */
#site-header { min-height: 3.9rem; }
.nav a[aria-current="page"]:not(.nav-cta) { border-bottom: 2px solid var(--spark); }
.nav .nav-cta[aria-current="page"] { background: var(--spark); }

.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--spark); }

.page-head { max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 7vw, 5rem) var(--pad) clamp(1rem, 3vw, 2rem); }
.page-head h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }

.section > .more { max-width: var(--max); margin-top: 2rem; }
.more a { font-weight: 600; }

.services h2 { font-size: 1.75rem; margin: 0; }
.services > li > div > p { margin: 0; }
.services > li > div > p + p, .services > li > div > .checks, .services > li > div > .table-wrap { margin-top: 1rem; }
.services > li > div > .table-wrap + p { margin-top: 1rem; }
.checks { margin: 0; padding-left: 1.1rem; }
.checks li { padding: .15rem 0; }

.table-wrap { overflow-x: auto; max-width: 34rem; }
.grades { width: 100%; border-collapse: collapse; font-size: .98rem; }
.grades th, .grades td { text-align: left; padding: .55rem .75rem .55rem 0; border-bottom: 1px solid var(--frost); }
.grades th { font-weight: 600; border-bottom: 1px solid var(--steel); }
.grades td:first-child { font-weight: 600; white-space: nowrap; }

.cta-band > .btn { display: table; }
.section-dark .btn-primary { background: var(--spark); }
.section-dark .btn-primary:hover { background: #4a9bd0; }
.section-dark .checks { margin-top: .5rem; }

/* Unnumbered points (not a sequence) */
.points { list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.points li { border-top: 3px solid var(--deep); padding-top: 1rem; }
.points h3 { margin: 0 0 .3em; }
.points p { margin: 0; color: #41566a; }
@media (max-width: 860px) { .points { grid-template-columns: 1fr; } }

/* Diamond shapes gallery */
.group { margin: 2.5rem 0 1.25rem; }
.shapes { list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2rem 1.5rem; }
.shapes svg { width: 84px; height: 84px; margin-bottom: .6rem; fill: #cfe3f2; stroke: var(--deep); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.shapes svg .in { fill: #f7fbfe; stroke: var(--steel); stroke-width: 1.2; }
.shapes svg path[d*="V50"], .shapes svg path[d*="M50 50"] { fill: none; }
.shapes h4 { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; line-height: 1.2; margin: 0 0 .25rem; }
.shapes p { margin: 0; font-size: .95rem; color: #41566a; }
.shapes svg path[d^="M50 8V96"] { fill: none; }
.section > .group { margin-left: auto; margin-right: auto; }

/* Photos. Shows a labeled placeholder until the image file exists. */
.banner { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.photo { position: relative; margin: 0; overflow: hidden; background: var(--frost); border-radius: 2px; }
.photo::after { content: attr(data-slot); position: absolute; inset: 0; display: grid; place-items: center; padding: 1rem; text-align: center; font-size: .9rem; color: var(--steel); }
.photo img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.photo-wide { aspect-ratio: 21 / 9; }
.photo-inline { aspect-ratio: 3 / 2; max-width: 34rem; margin-top: 1rem; }
.services > li > div > .photo + p, .services > li > div > .photo + .table-wrap { margin-top: 1rem; }
@media (max-width: 600px) { .photo-wide { aspect-ratio: 4 / 3; } }
.table-wrap.wide { max-width: none; }
.grades td { vertical-align: top; }

/* Contact form states */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn[disabled] { opacity: .6; cursor: wait; }
.form-status[data-state="ok"] { color: #a8e6c1; }
.form-status[data-state="error"] { color: #ffb4a8; }