:root {
  --ink: #2e2824;
  --muted: #6f5f53;
  --taupe: #dac0b0;
  --taupe-dark: #8f7464;
  --champagne: #f7eee6;
  --cream: #fffaf5;
  --rose: #cfa7a0;
  --line: rgba(46, 40, 36, .14);
  --shadow: 0 20px 60px rgba(60, 45, 35, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
body, button, input, select, textarea { -webkit-text-size-adjust: 100%; }

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 12px clamp(18px, 5vw, 72px);
  background: rgba(255, 250, 243, .86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.brand img { width: 78px; height: 42px; object-fit: cover; border-radius: 4px; }
.nav-links { display: flex; align-items: center; gap: 24px; color: var(--muted); font-size: 14px; }
.nav-links a:hover { color: var(--ink); }

.btn {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  min-height: 44px;
  padding: 0 18px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}
.btn.secondary { background: transparent; color: var(--ink); }
.btn.ghost { border-color: var(--line); background: rgba(255,255,255,.45); color: var(--ink); }
.btn.small { min-height: 34px; padding: 0 10px; font-size: 13px; }

.hero {
  min-height: calc(100svh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .82fr);
  align-items: stretch;
  background: var(--taupe);
  color: #fff9f1;
}
.hero-copy {
  padding: clamp(42px, 8vw, 110px) clamp(22px, 7vw, 96px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}
.eyebrow { text-transform: uppercase; letter-spacing: .24em; font-size: 12px; font-weight: 800; color: rgba(255,249,241,.78); }
h1, h2, h3 { line-height: 1.05; margin: 0; letter-spacing: 0; }
h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(52px, 8vw, 112px); max-width: 760px; }
.lead { max-width: 610px; font-size: clamp(18px, 2.2vw, 24px); color: rgba(255,249,241,.86); }
.hero-actions, .inline-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .btn.secondary { color: #fff9f1; border-color: rgba(255,249,241,.65); }
.hero-media {
  min-height: 520px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(46, 40, 36, .1), rgba(46, 40, 36, .2)),
    url("/assets/hero-studio.png") center / cover;
}

.section { padding: clamp(56px, 8vw, 104px) clamp(18px, 5vw, 72px); }
.section.alt { background: #f5e8de; }
.section-head { max-width: 780px; margin-bottom: 34px; }
.section-head h2 { font-size: clamp(34px, 5vw, 62px); font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.section-head p { color: var(--muted); font-size: 18px; }

.services-grid, .gallery-grid, .admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.service-card, .photo-card, .panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,250,243,.78);
  box-shadow: var(--shadow);
}
.service-card { padding: 22px; min-height: 236px; display: flex; flex-direction: column; gap: 16px; }
.service-card h3 { font-size: 24px; font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.service-card p { margin: 0; color: var(--muted); }
.service-meta { margin-top: auto; display: flex; justify-content: space-between; gap: 12px; font-weight: 800; }

.booking-form, .admin-form { display: grid; gap: 14px; }
.field { display: grid; gap: 7px; }
.field span, label { font-size: 13px; color: var(--muted); font-weight: 700; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255,255,255,.72);
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 16px;
}
textarea { min-height: 92px; resize: vertical; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 9px; }
.slot {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  min-height: 42px;
  color: var(--ink);
}
.slot.selected { background: var(--ink); color: var(--cream); }
.notice { padding: 12px; border-radius: 6px; background: #fff; border: 1px solid var(--line); color: var(--muted); }
.notice.success { color: #376044; border-color: rgba(55,96,68,.25); background: #f0f6ef; }
.notice.error { color: #8e3e37; border-color: rgba(142,62,55,.25); background: #fff1ef; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(46, 40, 36, .54);
  backdrop-filter: blur(8px);
}
.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(90svh, 920px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
  box-shadow: 0 24px 80px rgba(46, 40, 36, .28);
  padding: clamp(20px, 4vw, 34px);
}
.modal-dialog .section-head { margin-bottom: 22px; }
.modal-dialog .section-head h2 { font-size: clamp(30px, 4vw, 46px); }
.modal-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  margin-bottom: -26px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 26px;
  line-height: 1;
}
body.modal-open { overflow: hidden; }

.photo-card { overflow: hidden; }
.photo-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.photo-card div { padding: 14px; }
.photo-card h3 { font-size: 18px; margin-bottom: 4px; }
.photo-card p { margin: 0; color: var(--muted); }

.footer { padding: 34px clamp(18px, 5vw, 72px); border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 18px; color: var(--muted); }
.footer-contact { display: grid; gap: 8px; }
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}
.contact-link:hover { color: var(--ink); }
.contact-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-body { background: #f6ede5; }
.admin-layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100svh; }
.sidebar { padding: 24px; background: var(--ink); color: var(--cream); position: sticky; top: 0; height: 100svh; }
.sidebar .brand { margin-bottom: 30px; }
.sidebar nav { display: grid; gap: 8px; }
.sidebar a, .sidebar button { color: var(--cream); background: transparent; border: 1px solid rgba(255,255,255,.14); border-radius: 6px; min-height: 42px; text-align: left; padding: 10px 12px; }
.admin-main { padding: 28px; display: grid; gap: 22px; align-content: start; }
.admin-section { display: grid; gap: 14px; }
.panel { padding: 18px; overflow: hidden; }
.panel h2 { font-size: 28px; font-family: Georgia, "Times New Roman", serif; font-weight: 400; margin-bottom: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.status { border-radius: 999px; padding: 4px 9px; background: #fff; border: 1px solid var(--line); font-size: 12px; }
.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.calendar-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.calendar-day {
  min-width: 160px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.5);
  overflow: hidden;
}
.calendar-day header {
  display: grid;
  gap: 2px;
  padding: 10px;
  background: var(--taupe);
  color: #fffaf5;
}
.calendar-day header span { font-size: 12px; opacity: .88; }
.calendar-events { display: grid; gap: 8px; padding: 10px; }
.calendar-event {
  display: grid;
  gap: 4px;
  padding: 9px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
}
.calendar-event time { font-weight: 800; color: var(--taupe-dark); }
.calendar-event span { color: var(--muted); }
.calendar-event.pending { border-left: 4px solid #c6904c; }
.calendar-event.confirmed { border-left: 4px solid #376044; }
.calendar-event.done { opacity: .7; border-left: 4px solid #75685e; }
.calendar-empty { margin: 0; color: var(--muted); font-size: 13px; }
.archive-panel summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--ink);
}
.archive-panel summary span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  margin-left: 8px;
  border-radius: 999px;
  background: var(--taupe);
  color: #fffaf5;
  font-size: 12px;
}
.archive-panel .table-wrap { margin-top: 14px; }
.login-screen { min-height: 100svh; display: grid; place-items: center; padding: 20px; background: var(--taupe); }
.login-card { width: min(420px, 100%); padding: 26px; border-radius: 8px; background: var(--cream); box-shadow: var(--shadow); }
.hidden { display: none !important; }

@media (max-width: 900px) {
  .nav {
    position: sticky;
    align-items: center;
    min-height: 66px;
    padding: 10px 16px;
    gap: 12px;
  }
  .brand img { width: 68px; height: 36px; }
  .nav > .btn { min-height: 40px; padding: 0 13px; font-size: 14px; }
  .nav-links { display: none; }
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }
  .hero-copy {
    padding: 36px 18px 44px;
    gap: 18px;
  }
  .hero-media {
    min-height: 0;
    aspect-ratio: 4 / 3;
    order: -1;
    background-position: center;
  }
  h1 { font-size: clamp(44px, 12vw, 72px); }
  .lead { font-size: 17px; }
  .section { padding: 50px 18px; }
  .section-head { margin-bottom: 24px; }
  .section-head h2 { font-size: clamp(32px, 9vw, 48px); }
  .section-head p { font-size: 16px; }
  .services-grid, .gallery-grid, .admin-grid, .admin-layout { grid-template-columns: 1fr; }
  .service-card { min-height: 0; padding: 18px; }
  .photo-card img { aspect-ratio: 16 / 11; }
  .modal-dialog { width: min(680px, 100%); }
  .sidebar { position: static; height: auto; }
  .sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-board { grid-template-columns: repeat(5, 180px); }
  .admin-main { padding: 20px; }
  .panel[style*="grid-column"] { grid-column: auto !important; }
}

@media (max-width: 520px) {
  .nav { min-height: 62px; padding: 9px 12px; }
  .brand img { width: 60px; height: 32px; }
  .nav > .btn {
    min-height: 38px;
    padding: 0 10px;
    font-size: 13px;
  }
  h1 { font-size: 42px; }
  .hero-copy { padding: 32px 16px 38px; }
  .hero-media { aspect-ratio: 1 / .82; }
  .hero-actions .btn, .inline-actions .btn, .booking-form > .btn { width: 100%; white-space: normal; }
  .service-meta { align-items: center; }
  .slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .slot { min-width: 0; padding: 0 4px; }
  .modal { padding: 0; place-items: end center; }
  .modal-dialog {
    width: 100%;
    max-height: 92svh;
    border-radius: 14px 14px 0 0;
    padding: 16px;
  }
  .modal-dialog .section-head h2 { font-size: 30px; }
  .modal-close { width: 38px; height: 38px; margin-bottom: -18px; }
  .footer { display: grid; padding: 26px 16px; }
  .sidebar { padding: 16px; }
  .sidebar nav { grid-template-columns: 1fr; }
  .calendar-toolbar { display: grid; grid-template-columns: 1fr 1fr; }
  .calendar-toolbar strong { grid-column: 1 / -1; order: -1; }
  .admin-main { padding: 16px; }
  .panel { padding: 14px; }
  table { font-size: 13px; }
}

@media (max-width: 360px) {
  .nav > .btn { font-size: 12px; padding: 0 8px; }
  h1 { font-size: 38px; }
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
