/* ============================================================
   SoMar Fotostudio — Layout
   ------------------------------------------------------------
   Reset + base + container + section spacing + typography.
   Component-specific rules live in components.css.
   ============================================================ */

/* Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--linen);
  color: var(--driftwood);
  font-family: var(--font-sans);
  font-size: var(--type-body);
  line-height: 1.8;
  overflow-x: hidden;
  min-height: 100vh;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-base) var(--ease-out);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

input, textarea, select { font: inherit; color: inherit; }

ul, ol { list-style: none; }

[x-cloak] { display: none !important; }

/* Typography ─────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-serif); color: var(--espresso); font-weight: 400; }
h4, h5, h6 { font-family: var(--font-sans);  color: var(--espresso); font-weight: 500; }

.text-display  { font-family: var(--font-serif); font-size: var(--type-display); line-height: 1.0;  letter-spacing: -0.02em; font-weight: 400; color: var(--espresso); }
.text-h1       { font-family: var(--font-serif); font-size: var(--type-h1);      line-height: 1.1;  letter-spacing: -0.01em; font-weight: 400; color: var(--espresso); }
.text-h2       { font-family: var(--font-serif); font-size: var(--type-h2);      line-height: 1.15; font-weight: 400; color: var(--espresso); }
.text-h3       { font-family: var(--font-serif); font-size: var(--type-h3);      line-height: 1.2;  font-weight: 500; color: var(--espresso); }
.text-h4       { font-family: var(--font-sans);  font-size: var(--type-h4);      line-height: 1.4;  letter-spacing: 0.02em; font-weight: 500; color: var(--espresso); }

.text-body-large { font-size: var(--type-body-l); line-height: 1.9; font-weight: 300; }
.text-body       { font-size: var(--type-body);   line-height: 1.8; font-weight: 400; }
.text-body-small { font-size: var(--type-body-s); line-height: 1.6; font-weight: 400; letter-spacing: 0.01em; }
.text-caption    { font-size: var(--type-caption); line-height: 1.5; font-weight: 300; letter-spacing: 0.02em; }

.text-overline {
  font-size: var(--type-overline);
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.text-button {
  font-size: var(--type-button);
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.text-balance { text-wrap: balance; }

/* Container + section ───────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.section {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
}

@media (max-width: 768px) {
  .section {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
  }
}

@media (max-width: 480px) {
  .section {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
  }
}

/* Grid helpers ──────────────────────────────────────── */
.grid     { display: grid; gap: var(--space-md); }
.grid-2   { grid-template-columns: 1fr; }
.grid-3   { grid-template-columns: 1fr; }
.grid-4   { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid-2.sm-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3.sm-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4.sm-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); gap: var(--space-xl); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
  .grid-2 { gap: var(--space-2xl); }
}

/* Color utility classes ─────────────────────────────── */
.bg-linen     { background: var(--linen); }
.bg-white     { background: var(--white); }
.bg-espresso  { background: var(--espresso); color: var(--linen); }
.bg-warm      { background: rgba(var(--espresso-rgb), 0.05); }
.text-espresso   { color: var(--espresso); }
.text-driftwood  { color: var(--driftwood); }
.text-warm-stone { color: var(--warm-stone); }
.text-terracotta { color: var(--terracotta); }
.text-linen      { color: var(--linen); }

/* Accent line — small terracotta divider ────────────── */
.accent-line {
  width: 60px;
  height: 1px;
  background: var(--terracotta);
  border: none;
}

.divider {
  width: 100%;
  height: 1px;
  background: rgba(var(--warm-stone-rgb), 0.2);
  border: none;
}

/* Warm-glow background gradient ─────────────────────── */
.warm-glow {
  background-image: radial-gradient(
    ellipse at top center,
    rgba(var(--terracotta-rgb), 0.08) 0%,
    transparent 60%
  );
}

/* Visually hidden ─────────────────────────────────────── */
.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;
}
