/* Studios33 base: reset, typography, layout, header, buttons, footer */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.012em;
  margin: 0;
}

h1 { font-size: var(--text-h1); line-height: 1.04; letter-spacing: -0.022em; }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }

p { margin: 0 0 var(--space-4); }
strong { color: var(--ink); font-weight: 600; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--paper-deep);
  color: var(--ink);
  padding: 1px 6px;
  border-radius: var(--radius);
  overflow-wrap: anywhere;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: var(--paper); padding: var(--space-2) var(--space-4); z-index: 200;
}
.skip-link:focus { left: var(--space-4); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* Labels */
.label {
  display: inline-flex; align-items: center; gap: var(--space-3);
  font-size: var(--text-xs); font-weight: 600;
  letter-spacing: var(--tracking-label); text-transform: uppercase;
  color: var(--muted);
}
.label::before { content: ""; width: 28px; height: 2px; background: var(--accent); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: rgba(244, 242, 236, 0.96);
  border-bottom: var(--rule);
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-5); min-height: 72px; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: var(--space-3); text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-word {
  font-family: var(--font-sans); font-weight: 600; font-size: 0.98rem;
  letter-spacing: 0.16em; color: var(--ink);
}
.brand-word span { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: var(--space-5); }
.nav-links a {
  color: var(--ink-2); text-decoration: none; font-size: var(--text-sm); font-weight: 500;
  padding: var(--space-2) 0; border-bottom: 2px solid transparent;
  transition: color var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease);
}
.nav-links a:hover { color: var(--ink); border-bottom-color: var(--line-strong); }
.nav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.lang-switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.lang-switch a, .lang-switch span {
  font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em;
  padding: 6px 10px; text-decoration: none; color: var(--ink-2); border: 0;
}
.lang-switch span { background: var(--ink); color: var(--paper); }
.nav-links .lang-switch a { padding: 6px 10px; border: 0; }

.nav-toggle {
  display: none; min-height: var(--touch-target);
  background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius);
  color: var(--ink); font: 600 var(--text-sm) var(--font-sans); padding: 0 var(--space-4); cursor: pointer;
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav-links {
    display: none; width: 100%; flex-direction: column; align-items: flex-start;
    gap: 0; padding-bottom: var(--space-4);
  }
  .nav-links.is-open { display: flex; }
  .nav-links > a { width: 100%; min-height: var(--touch-target); display: flex; align-items: center; border-bottom: var(--rule); }
  .nav-links .lang-switch { margin-top: var(--space-4); }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--touch-target); padding: 0 var(--space-5);
  font: 600 var(--text-sm) var(--font-sans); letter-spacing: 0.01em;
  text-decoration: none; border-radius: var(--radius); border: 1px solid transparent;
  transition: background var(--duration-normal) var(--ease), color var(--duration-normal) var(--ease), border-color var(--duration-normal) var(--ease);
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-strong); color: #fff; }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }

.arrow-link { font-weight: 600; text-decoration: none; display: inline-flex; gap: var(--space-2); min-height: var(--touch-target); align-items: center; }
.arrow-link::after { content: "→"; transition: transform var(--duration-normal) var(--ease); }
.arrow-link:hover::after { transform: translateX(3px); }

/* Sections */
.section { padding: var(--space-section) 0; border-top: var(--rule); }
.section-head {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: var(--space-6); margin-bottom: var(--space-8); align-items: start;
}
.section-num { font-family: var(--font-serif); font-size: var(--text-lg); color: var(--accent); display: block; margin-bottom: var(--space-3); }
.section-head p { font-size: var(--text-lg); color: var(--ink-2); max-width: var(--measure); margin: 0; }

@media (max-width: 860px) {
  .section-head { grid-template-columns: 1fr; gap: var(--space-4); margin-bottom: var(--space-7); }
}

/* Footer */
.site-footer { border-top: var(--rule); padding: var(--space-7) 0 var(--space-6); font-size: var(--text-sm); color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: var(--space-6); margin-bottom: var(--space-7); }
.footer-grid h4 { font-family: var(--font-sans); font-size: var(--text-xs); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--ink); margin-bottom: var(--space-3); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li a { color: var(--ink-2); text-decoration: none; display: inline-block; padding: 4px 0; }
.footer-grid li a:hover { color: var(--accent); }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4); border-top: var(--rule); padding-top: var(--space-5); }

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

.footer-legal { margin-top: var(--space-3); font-style: normal; font-size: var(--text-xs); line-height: 1.6; color: var(--muted); }
