:root {
  --bg: #f4f2ec;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: rgba(255, 255, 255, 0.95);
  --panel-soft: rgba(242, 239, 232, 0.86);
  --text: #17181f;
  --muted: #656875;
  --line: rgba(23, 24, 31, 0.11);
  --line-strong: rgba(23, 24, 31, 0.22);
  --accent: #4d4ed8;
  --accent-strong: #2f35ba;
  --accent-soft: rgba(77, 78, 216, 0.1);
  --warm: #d86f35;
  --shadow: 0 24px 60px rgba(31, 37, 64, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(77, 78, 216, 0.12), transparent 22%),
    radial-gradient(circle at 88% 14%, rgba(216, 111, 53, 0.12), transparent 18%),
    linear-gradient(180deg, #fbfaf7 0%, var(--bg) 100%);
}

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

img {
  display: block;
  max-width: 100%;
}

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

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(23, 24, 31, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 24, 31, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 22px 22px;
}

.workspace {
  position: relative;
  z-index: 1;
  width: min(1380px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 18px 0 28px;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 18px;
}

.sidebar,
.panel {
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  box-shadow: var(--shadow);
}

.sidebar {
  position: sticky;
  top: 18px;
  align-self: start;
  padding: 22px;
  display: grid;
  gap: 24px;
}

.brand-kicker,
.tree-label,
.eyebrow,
.mini-label,
.panel-bar,
.side-note span,
.quote-line span {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  font-weight: 800;
}

.brand-kicker,
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
}

.sidebar h1,
.editor h2,
.editor h3 {
  margin: 0;
  font-family: Outfit, sans-serif;
  letter-spacing: 0;
}

.sidebar h1 {
  max-width: 10ch;
  font-size: clamp(2.6rem, 4vw, 4.5rem);
  line-height: 0.95;
}

.brand-copy,
.lead,
.service-item p,
.stack-copy p,
.contact-copy p,
.form-note,
.side-note strong,
.quote-line p {
  color: var(--muted);
  line-height: 1.8;
}

.tree-block {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  display: grid;
  gap: 8px;
}

.tree-label {
  color: var(--muted);
}

.tree-link {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  text-align: left;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}

.tree-link.active,
.tree-link:hover {
  background: rgba(77, 78, 216, 0.12);
  transform: translateX(3px);
}

.side-note {
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(77, 78, 216, 0.12), rgba(216, 111, 53, 0.08));
  border: 1px solid rgba(77, 78, 216, 0.1);
}

.side-note strong {
  display: block;
  margin-top: 10px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}

.editor {
  display: grid;
  gap: 18px;
}

.panel {
  overflow: hidden;
}

.panel-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  color: var(--muted);
  background: rgba(244, 242, 236, 0.92);
  border-bottom: 1px solid var(--line);
}

.hero-grid,
.panel-row,
.contact-grid {
  display: grid;
  gap: 18px;
}

.hero-grid {
  grid-template-columns: 1.15fr 0.85fr;
  padding: 24px;
  align-items: stretch;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-copy h2,
.contact-copy h2 {
  max-width: 12ch;
  font-size: clamp(2.3rem, 4.6vw, 4.6rem);
  line-height: 0.95;
}

.lead {
  max-width: 56ch;
  margin: 18px 0 0;
}

.hero-actions,
.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease;
  will-change: transform;
}

.button.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 14px 30px rgba(77, 78, 216, 0.24);
}

.button.ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.56);
}

.preview-card,
.stack-image,
.portrait-card {
  border-radius: 22px;
  overflow: hidden;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.preview-card {
  min-height: 360px;
  position: relative;
}

.preview-card img,
.stack-image img,
.portrait-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-card figcaption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--warm);
}

.panel-row {
  grid-template-columns: 1.08fr 0.92fr;
}

.note-panel,
.stack-panel,
.contact-shell {
  min-height: 100%;
}

.service-list,
.stack-copy,
.quote-line,
.contact-copy,
.contact-form {
  padding: 22px;
}

.service-list {
  display: grid;
  gap: 14px;
}

.service-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.service-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
}

.service-icon svg,
.button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-item h3,
.stack-copy h3 {
  font-size: 1.2rem;
  line-height: 1.05;
}

.stack-panel {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}

.stack-copy {
  padding-bottom: 10px;
}

.stack-image {
  margin: 0 22px;
  min-height: 240px;
}

.quote-line {
  display: grid;
  gap: 8px;
}

.quote-line p {
  margin: 0;
  color: var(--text);
  font-weight: 600;
}

.contact-grid {
  grid-template-columns: 0.44fr 0.56fr;
}

.contact-copy {
  display: grid;
  align-content: start;
  gap: 12px;
}

.portrait-card {
  aspect-ratio: 0.9 / 1;
  max-width: 280px;
}

.contact-form {
  display: grid;
  gap: 14px;
  border-left: 1px solid var(--line);
}

.row.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  padding: 0.95rem 1rem;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(77, 78, 216, 0.38);
  box-shadow: 0 0 0 4px rgba(77, 78, 216, 0.08);
}

textarea {
  min-height: 148px;
  resize: vertical;
}

.form-note {
  min-height: 24px;
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

.tilt-card {
  will-change: transform;
  transition: transform 160ms ease;
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .hero-grid,
  .panel-row,
  .contact-grid,
  .row.two {
    grid-template-columns: 1fr;
  }

  .contact-form {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .workspace {
    width: min(1380px, calc(100vw - 16px));
    padding: 8px 0 18px;
    gap: 14px;
  }

  .sidebar,
  .panel {
    border-radius: 20px;
  }

  .sidebar,
  .hero-grid,
  .service-list,
  .stack-copy,
  .quote-line,
  .contact-copy,
  .contact-form {
    padding: 18px;
  }

  .stack-image {
    margin: 0 18px;
  }

  .panel-bar {
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
  }

  .hero-copy h2,
  .contact-copy h2 {
    max-width: none;
    font-size: clamp(2.2rem, 12vw, 3.6rem);
  }

  .button {
    width: 100%;
  }
}
