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

/* ─── Tokens ─────────────────────────────────────────────────────────── */
:root {
  --sidebar-w:   180px;
  --photo-w:     280px;
  --content-px:  56px;
  --section-gap: 72px;

  --color-text:    #1a1a1a;
  --color-muted:   #888888;
  --color-rule:    #e5e5e5;
  --color-accent:  #cc2200;
  --color-bg:      #ffffff;

  --font: 'DM Sans', system-ui, -apple-system, sans-serif;
}

/* ─── Base ───────────────────────────────────────────────────────────── */
html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}

a {
  color: inherit;
  text-decoration: none;
}

/* ─── 3-column layout ────────────────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr var(--photo-w);
  align-items: start;
  min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 40px 24px 40px 40px;
  border-right: 1px solid var(--color-rule);
  display: flex;
  flex-direction: column;
  gap: 28px;
  overflow: hidden;
}

.sidebar__brand {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.01em;
}

.sidebar__nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--color-muted);
  padding: 4px 0;
  transition: color 0.15s;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-text);
  font-weight: 600;
}

/* ─── Content ────────────────────────────────────────────────────────── */
.content {
  padding: 40px var(--content-px) 80px;
  border-right: 1px solid var(--color-rule);
}

/* ─── Content sections ───────────────────────────────────────────────── */
.content-section {
  padding-bottom: var(--section-gap);
  margin-bottom: var(--section-gap);
  border-bottom: 1px solid var(--color-rule);
}

h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.subtitle {
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 28px;
}

h2 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

.content-section p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 16px;
  max-width: 65ch;
}

.content-section p:last-child {
  margin-bottom: 0;
}

.content-section p.lead {
  font-weight: 600;
}

.bullets {
  list-style: disc;
  padding-left: 18px;
  margin: 8px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bullets li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
}

/* ─── Tooltip ────────────────────────────────────────────────────────── */
.tooltip-trigger {
  position: relative;
  cursor: default;
}

.tooltip {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 100;
  background: var(--color-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  padding: 16px 20px;
  width: 320px;
  pointer-events: none;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

.tooltip-trigger:hover .tooltip,
.tooltip-trigger:focus .tooltip {
  display: block;
}

/* ─── CTA group ──────────────────────────────────────────────────────── */
.cta-group {
  padding: 48px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-bottom: 1px solid var(--color-rule);
  margin-bottom: var(--section-gap);
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cta-btn {
  display: inline-block;
  padding: 11px 22px;
  background: var(--color-text);
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  min-width: 190px;
  text-align: center;
  transition: background 0.15s;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.cta-row:hover .cta-btn {
  background: var(--color-accent);
}

.cta-desc {
  font-size: 13px;
  color: var(--color-muted);
  transition: color 0.15s;
}

.cta-row:hover .cta-desc {
  color: var(--color-accent);
}

/* ─── Photo panel ────────────────────────────────────────────────────── */
.photo-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
}

.photo-panel::-webkit-scrollbar {
  display: none;
}

.photo-panel img {
  width: 100%;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-bottom: 3px solid var(--color-bg);
  flex-shrink: 0;
}

/* sketch image: show full drawing, not cropped */
.photo-panel img:nth-child(3) {
  object-fit: contain;
  background: #f5f0e8;
  aspect-ratio: 4 / 3;
}

/* ─── Responsive: tablet ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root {
    --sidebar-w:  140px;
    --photo-w:    220px;
    --content-px: 40px;
  }
}

@media (max-width: 860px) {
  :root {
    --photo-w: 180px;
    --content-px: 32px;
  }
}

/* ─── Responsive: mobile ─────────────────────────────────────────────── */
@media (max-width: 680px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  /* Sidebar becomes a top bar */
  .sidebar {
    position: sticky;
    top: 0;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
    border-right: none;
    border-bottom: 1px solid var(--color-rule);
    background: var(--color-bg);
    z-index: 50;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .sidebar::-webkit-scrollbar { display: none; }

  .sidebar__brand {
    white-space: nowrap;
    flex-shrink: 0;
    padding-right: 4px;
    border-right: 1px solid var(--color-rule);
  }

  .sidebar__nav {
    flex-direction: row;
    gap: 0;
  }

  .nav-link {
    white-space: nowrap;
    padding: 4px 12px;
  }

  /* Hide photo panel on mobile */
  .photo-panel {
    display: none;
  }

  .content {
    padding: 28px 20px 60px;
  }

  :root {
    --section-gap: 48px;
  }

  h1 { font-size: 26px; }
  h2 { font-size: 22px; }

  .cta-btn {
    min-width: 0;
    width: 100%;
  }

  .cta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .tooltip {
    width: min(320px, 80vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
