:root {
  --teal: #073d36;
  --teal-dark: #03312b;
  --paper: #f8f5ec;
  --paper-soft: #f0efe7;
  --ink: #123d37;
  --muted: #6b7a72;
  --gold: #f4b414;
  --line: rgba(7, 61, 54, 0.12);
  --shadow: 0 22px 54px rgba(3, 49, 43, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--teal-dark);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body.mivp-overlay-open {
  overflow: hidden;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

.page-accent {
  position: fixed;
  z-index: 0;
  width: 32vw;
  height: 32vw;
  pointer-events: none;
}

.page-accent-left {
  left: 0;
  top: 0;
  background: linear-gradient(135deg, var(--gold) 0 49%, transparent 50%);
  opacity: 0.95;
}

.page-accent-right {
  right: 0;
  bottom: 0;
  background: linear-gradient(315deg, var(--gold) 0 49%, transparent 50%);
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 48px));
  margin: 56px auto;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.site-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 64px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 700;
}

.brand-mark {
  width: 31px;
  height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--teal);
  color: var(--paper);
  font-size: 12px;
}

.main-nav,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.main-nav a,
.header-link,
.text-link {
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
}

.main-nav a:hover,
.header-link:hover,
.text-link:hover {
  color: #986f00;
}

.hero-section {
  position: relative;
  display: grid;
  grid-template-columns: 0.92fr 1.28fr;
  min-height: 520px;
  background: #f2f3ed;
}

.hero-section::before,
.about-section::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 64px;
  background: linear-gradient(45deg, var(--gold) 0 49%, transparent 50%);
}

.hero-copy {
  padding: 94px 64px 72px;
  align-self: center;
}

.section-kicker {
  margin: 0 0 12px;
  color: #57736b;
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.06;
  color: var(--ink);
  letter-spacing: 0;
}

h1 {
  max-width: 390px;
  font-size: clamp(40px, 6vw, 68px);
}

h2 {
  font-size: clamp(30px, 4vw, 48px);
}

h3 {
  font-size: 24px;
}

.hero-copy p:not(.section-kicker),
.about-copy p,
.section-heading p,
.settings-copy p,
.contact-section p {
  max-width: 590px;
  color: var(--muted);
  font-size: 16px;
}

.hero-copy .viewer-cue {
  display: inline-flex;
  width: fit-content;
  margin: 8px 0 20px;
  padding: 10px 14px;
  border-left: 4px solid var(--gold);
  background: rgba(248, 245, 236, 0.72);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--teal);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.primary-action {
  background: var(--teal);
  color: var(--paper);
}

.secondary-action {
  background: transparent;
  color: var(--teal);
}

.hero-feature {
  position: relative;
  margin: 0;
  min-height: 520px;
}

.hero-feature .mivp-viewer,
.hero-feature .mivp-image {
  width: 100%;
  height: 100%;
}

.hero-feature .mivp-image {
  object-fit: cover;
}

.hero-feature figcaption {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 24px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  background: rgba(248, 245, 236, 0.92);
  border-left: 4px solid var(--gold);
  color: var(--ink);
  font-size: 13px;
}

.hero-feature figcaption span,
.portfolio-card figcaption span {
  color: var(--muted);
}

.studio-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 28px 64px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  color: #789089;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  text-align: center;
}

.studio-strip span + span {
  border-left: 1px solid var(--line);
}

.about-section {
  position: relative;
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  gap: 72px;
  padding: 104px 78px 96px;
  background: var(--paper);
}

.about-collage {
  position: relative;
  min-height: 420px;
}

.collage-frame {
  position: absolute;
  margin: 0;
  background: #fff;
  box-shadow: 0 20px 34px rgba(3, 49, 43, 0.14);
}

.collage-frame-large {
  left: 0;
  top: 26px;
  width: 64%;
}

.collage-frame-small {
  right: 0;
  bottom: 4px;
  width: 48%;
}

.collage-frame .mivp-image {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.collage-frame-small .mivp-image {
  aspect-ratio: 1 / 1;
}

.about-copy {
  align-self: center;
}

.about-copy h2 {
  max-width: 500px;
}

.portfolio-section {
  padding: 92px 64px 104px;
  background: #eef1eb;
}

.section-heading {
  max-width: 620px;
  margin: 0 auto 44px;
  text-align: center;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.portfolio-card {
  background: var(--paper);
  border: 1px solid rgba(7, 61, 54, 0.08);
}

.portfolio-card-wide {
  grid-column: span 2;
}

.portfolio-card figure {
  margin: 0;
}

.portfolio-card .mivp-image {
  width: 100%;
  aspect-ratio: 1 / 1.16;
  object-fit: cover;
}

.portfolio-card-wide .mivp-image {
  aspect-ratio: 16 / 9;
}

.portfolio-card figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px 18px;
  font-size: 13px;
}

.photo-widget .mivp-viewer {
  background: #e8e3d7;
}

.photo-widget .mivp-viewer:focus {
  outline-color: var(--gold);
}

.settings-section {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 44px;
  padding: 92px 78px;
  background: var(--paper);
}

.settings-panel {
  display: grid;
  gap: 14px;
  padding: 28px;
  background: #eef1eb;
  border: 1px solid rgba(7, 61, 54, 0.1);
}

.setting-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1.2fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  font-size: 14px;
  color: var(--ink);
}

.setting-row-switch {
  grid-template-columns: 1fr auto;
}

.setting-row output {
  min-width: 54px;
  text-align: right;
  color: var(--muted);
  font-size: 13px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--teal);
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

select {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(7, 61, 54, 0.16);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  padding: 0 10px;
}

.contact-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 72px 78px 84px;
  background: #f0efe7;
  border-top: 1px solid var(--line);
}

.mivp-overlay {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (max-width: 920px) {
  .site-shell {
    width: min(100% - 28px, 720px);
    margin: 28px auto;
  }

  .site-header {
    padding: 20px 28px;
    flex-wrap: wrap;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  .hero-section,
  .about-section,
  .settings-section {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .portfolio-section,
  .about-section,
  .settings-section,
  .contact-section {
    padding-left: 28px;
    padding-right: 28px;
  }

  .hero-feature {
    min-height: 440px;
  }

  .studio-strip {
    grid-template-columns: repeat(2, 1fr);
    padding: 24px 28px;
    row-gap: 18px;
  }

  .studio-strip span + span {
    border-left: 0;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-card-wide {
    grid-column: auto;
  }

  .portfolio-card .mivp-image,
  .portfolio-card-wide .mivp-image {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 620px) {
  .site-shell {
    width: 100%;
    margin: 0;
  }

  .header-link {
    display: none;
  }

  .hero-copy {
    padding-top: 56px;
  }

  .hero-actions,
  .contact-section {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-feature figcaption,
  .portfolio-card figcaption {
    align-items: flex-start;
    flex-direction: column;
  }

  .about-collage {
    min-height: auto;
    display: grid;
    gap: 16px;
  }

  .collage-frame {
    position: static;
    width: 100%;
  }

  .setting-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .setting-row-switch {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}