/* ============================================
   Studio Rees — style.css
   Human-Centred Architecture
   ============================================ */

/* --- Design tokens --- */
:root {
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-md:   1.125rem;
  --text-lg:   1.25rem;
  --text-xl:   1.5rem;
  --text-2xl:  2rem;

  --space-xs:  0.5rem;
  --space-sm:  0.75rem;
  --space-md:  1.25rem;
  --space-lg:  2rem;
  --space-xl:  3.5rem;
  --space-2xl: 5rem;

  --color-bg:           #ffffff;
  --color-text-primary: #1a1a1a;
  --color-text-body:    #555555;
  --color-text-muted:   #999999;
  --color-border:       #f0f0f0;
  --color-border-mid:   #e0e0e0;
  --color-border-tag:   #e8e8e8;
  --color-text-alt:     #548596;

  --max-width:    680px;
  --prose-width:  560px;
  --narrow-width: 480px;

  --radius-sm: 3px;
  --radius-md: 6px;
}

/* --- Dark mode --- */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg:           #202020;
    --color-text-primary: #e8e8e8;
    --color-text-body:    #888888;
    --color-text-muted:   #707070;
    --color-border:       #1e1e1e;
    --color-border-mid:   #2a2a2a;
    --color-border-tag:   #2a2a2a;
  }
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-size: var(--text-base);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Accessibility --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-text-primary);
  color: var(--color-bg);
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-sm);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section { padding: var(--space-2xl) 0; }

.divider {
  width: 32px;
  height: 1px;
  background: var(--color-border-mid);
  margin: 0 auto;
}

/* --- Header & nav --- */
.site-header {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--color-border);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.nav-logo {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.6; }

.nav-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- Shared --- */
.section-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-xl);
}

.eyebrow {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

/* --- Hero --- */
.hero {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-xl);
}

.hero-statement {
  font-size: clamp(var(--text-xl), 5vw, var(--text-2xl));
  font-weight: 500;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-bottom: var(--space-md);
  max-width: var(--narrow-width);
  letter-spacing: -0.01em;
}

.hero-sub {
  font-size: var(--text-md);
  color: var(--color-text-body);
  line-height: 1.8;
  max-width: var(--narrow-width);
}

/* --- Founding principle --- */
.principle-lead {
  font-size: clamp(var(--text-lg), 3vw, var(--text-xl));
  font-weight: 500;
  color: var(--color-text-primary);
  line-height: 1.35;
  margin-bottom: var(--space-md);
  letter-spacing: -0.01em;
}

.principle-body {
  font-size: var(--text-base);
  color: var(--color-text-body);
  line-height: 1.85;
  margin-bottom: var(--space-md);
  max-width: var(--prose-width);
}
.principle-body:last-of-type { margin-bottom: 0; }

/* --- Pull quote --- */
.pull-quote {
  border-left: 2px solid var(--color-border-mid);
  padding-left: var(--space-lg);
  margin: var(--space-xl) 0;
}

.pull-quote p {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: clamp(var(--text-md), 3vw, var(--text-lg));
  color: var(--color-text-primary);
  line-height: 1.6;
  font-style: italic;
}

/* --- Services --- */
.service {
  padding-bottom: var(--space-xl);
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--color-border);
}

.service:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.service-title {
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--color-text-primary);
  line-height: 1.35;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.005em;
}

.service-body {
  font-size: var(--text-base);
  color: var(--color-text-body);
  line-height: 1.85;
  max-width: var(--prose-width);
}

/* --- Contact --- */
.contact-text {
  font-size: var(--text-base);
  color: var(--color-text-body);
  line-height: 1.8;
  margin-bottom: var(--space-md);
  max-width: var(--narrow-width);
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text-alt);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border-mid);
  padding-bottom: 2px;
  transition: border-color 0.2s, opacity 0.2s;
}
.contact-link:hover {
  border-color: var(--color-text-primary);
  opacity: 0.7;
}
.contact-link:focus-visible {
  outline: 2px solid var(--color-text-primary);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) 0;
  margin-top: var(--space-lg);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.footer-name {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.footer-line {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- Credentials (about variant) --- */
.credentials {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-lg);
}

.credential {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--color-border-tag);
  border-radius: var(--radius-sm);
  padding: 0.3rem var(--space-sm);
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .container    { padding: 0 var(--space-md); }
  .section      { padding: var(--space-xl) 0; }
  .hero         { padding-top: var(--space-xl); }
  .nav-sub      { display: none; }
  .footer-line  { display: none; }
}

/* --- Print --- */
@media print {
  .skip-link { display: none; }
  .site-header { border-bottom: 1px solid #ccc; }
  .service { border-bottom: 1px solid #ddd; }
  a { color: inherit; text-decoration: none; }
  .contact-link::after {
    content: " (" attr(href) ")";
    font-size: var(--text-sm);
    color: #666;
  }
}