/* ==========================================================================
   MODOM — Base layer (ATELIER design language)
   Reset, paper surface, Newsreader/Manrope type, buttons, panels, utilities.
   ========================================================================== */

/* --- Modern reset --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--weight-body);
  color: var(--text);
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 255, 255, 0.82), transparent 30%),
    radial-gradient(circle at 82% 10%, rgba(221, 211, 198, 0.34), transparent 34%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  overflow-x: hidden;
}

img, picture, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }

/* [hidden] must always win over component display rules (e.g. the form
   honeypot field carries .field { display: flex }) */
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}
::selection { background: var(--accent); color: var(--paper); }

/* --- Headings: Newsreader, light editorial serif ------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-display);
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-display); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-display); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.045em; }
h4 { font-size: var(--fs-h4); letter-spacing: -0.025em; }

p { text-wrap: pretty; }
strong { font-weight: var(--weight-bold); }
.tabular { font-variant-numeric: tabular-nums; }

/* --- Layout helpers ------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--edge-x);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: var(--section-y-tight); }

.section[id], [id].anchor { scroll-margin-top: calc(var(--header-h) + 24px); }

/* Optional dark section (used sparingly; body is paper) */
.section--dark { background: var(--ink); color: var(--paper); }
.section--panel { background: var(--panel); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--paper); }

/* --- Section label (Manrope, accent, short rule below) ------------------- */
.eyebrow {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-12);
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  color: var(--accent);
}
.eyebrow::after { content: ""; width: 48px; height: 1px; background: #9f7851; }
.section--dark .eyebrow { color: var(--taupe); }

.section-head { max-width: 56ch; margin-bottom: clamp(2rem, 1.2rem + 2.5vw, 3.5rem); }
.section-head .eyebrow { margin-bottom: var(--space-24); }
.section-head p { margin-top: var(--space-24); color: var(--text-soft); font-size: var(--fs-lead); }

.lead { font-size: var(--fs-lead); color: var(--text-soft); line-height: 1.72; }

/* --- Buttons (ATELIER) ---------------------------------------------------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-12);
  min-height: 54px;
  padding: 0 1.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: var(--weight-bold);
  letter-spacing: -0.01em;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  box-shadow: 0 18px 42px rgba(25, 21, 18, 0.16);
  transition: background var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}
.btn:hover { background: #29231f; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--lg { min-height: 66px; padding: 0 2rem; font-size: 1.02rem; }

.btn--ghost {
  --btn-bg: #f1ebe3;
  --btn-fg: var(--ink);
  border-color: #d1c4b7;
  box-shadow: 0 12px 28px rgba(88, 72, 58, 0.055);
}
.btn--ghost:hover { background: #f8f2ea; border-color: #c6b49f; }

.btn--on-dark { --btn-fg: #fff; }
.btn--ghost.btn--on-dark {
  --btn-bg: rgba(247, 240, 233, 0.06); --btn-fg: var(--paper);
  border-color: var(--line-on-dark); box-shadow: none;
}
.btn--ghost.btn--on-dark:hover { background: rgba(247, 240, 233, 0.12); border-color: var(--taupe); }

.btn .btn__icon { width: 20px; height: 20px; flex: none; transition: transform var(--dur-base) var(--ease-out); }
.btn i.btn__icon { width: auto; height: auto; font-size: 17px; line-height: 1; }
.btn:hover .btn__icon { transform: translateX(3px); }

/* --- Text link with arrow ------------------------------------------------- */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-12);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  color: var(--accent);
  padding-block: 4px;
  transition: color var(--dur-base) var(--ease-out);
}
.link-arrow:hover { color: var(--ink); }
.section--dark .link-arrow { color: var(--taupe); }
.section--dark .link-arrow:hover { color: var(--paper); }
.link-arrow svg { width: 17px; height: 17px; transition: transform var(--dur-base) var(--ease-out); }
.link-arrow:hover svg { transform: translateX(4px); }

/* --- Premium panel + material dots (ATELIER signature) ------------------- */
.premium-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-panel);
}
.material-dot {
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 5px 12px rgba(46, 35, 27, 0.1), inset 0 0 0 1px rgba(80, 65, 50, 0.08);
}
.material-dot--stone  { background: radial-gradient(circle at 35% 25%, #e6dfd5, #bfb5aa); }
.material-dot--wood   { background: linear-gradient(90deg, #786653, #b39a82, #705844); }
.material-dot--metal  { background: radial-gradient(circle at 30% 20%, #333638, #111314); }
.material-dot--sand   { background: radial-gradient(circle at 40% 20%, #d8ceb9, #a9967f); }
.material-dot--copper { background: linear-gradient(120deg, #6d452d, #b57b4d, #553722); }
.material-dot--linen  { background: radial-gradient(circle at 35% 25%, #e1dcd5, #bdb5ac); }

/* --- Hairline divider ----------------------------------------------------- */
.rule { height: 1px; border: 0; background: var(--line-warm); }
.section--dark .rule { background: var(--line-on-dark); }

/* --- Accessibility utilities --------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: var(--space-16);
  top: -120px;
  z-index: var(--z-modal);
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-sm);
  font-weight: var(--weight-bold);
  transition: top var(--dur-base) var(--ease-out);
}
.skip-link:focus { top: var(--space-16); }

/* --- Reveal on scroll (ATELIER: 1.2s, 30px) ------------------------------ */
[data-reveal] { opacity: 1; }
.js [data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1 !important; transform: none !important; transition: none; }
  .btn, .link-arrow svg, .btn__icon { transition: background var(--dur-base); }
}
