:root {
  --bg: #f5f1ea;
  --surface: #fffaf3;
  --surface-2: #ebe4d8;
  --text: #17211d;
  --muted: #68756e;
  --primary: #4f7d68;
  --primary-dark: #345b4b;
  --accent: #d4a373;
  --border: #d9d0c2;
  --shadow: 0 18px 55px rgba(37, 54, 47, 0.12);
  --radius: 24px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: Inter, system-ui, sans-serif;
}

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

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

body {
  min-height: 100dvh;
  overflow-x: hidden;
  font-family: var(--font-body);
  color: var(--text);
  background: linear-gradient(180deg, var(--bg), #ebe5da);
  line-height: 1.65;
}

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

img {
  height: auto;
}

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

button,
input,
textarea,
select {
  max-width: 100%;
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(100% - 2rem, 1180px);
  margin-inline: auto;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 241, 234, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 70px;
  padding: 0.5rem 0;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.65rem;
}

.brand-mark {
  display: block;
  width: 54px;
  height: 54px;
  min-width: 54px;
  min-height: 54px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
}

.brand-text {
  display: grid;
  min-width: 0;
  line-height: 1.05;
}

.brand-text strong {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 1.28rem;
  line-height: 1;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-text span {
  margin-top: 0.15rem;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Navigation */

.main-nav {
  position: fixed;
  inset: 76px 1rem auto;
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.main-nav.open {
  display: flex;
}

.main-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary-dark);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.header-cta {
  display: none;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.15rem;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.btn-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 12px 28px rgba(79, 125, 104, 0.22);
}

.btn-primary:hover {
  color: #fff;
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-2);
  transform: translateY(-1px);
}

/* Hero */

.hero {
  padding: clamp(3rem, 8vw, 7rem) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  margin-bottom: 1rem;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero h1,
.section-title,
h2 {
  font-family: var(--font-display);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.hero h1 {
  max-width: 10ch;
  font-size: clamp(2.75rem, 13vw, 6.6rem);
  overflow-wrap: break-word;
}

.hero p.lead {
  max-width: 58ch;
  margin: 1.2rem 0 1.5rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 3vw, 1.45rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-card {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(23, 33, 29, 0.03) 0%,
    rgba(23, 33, 29, 0.08) 55%,
    rgba(23, 33, 29, 0.58) 100%
  );
}

.hero-image {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: center;
}

.hero-card-caption {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 2;
  color: #fff;
}

.hero-card-caption .eyebrow {
  margin-bottom: 0.55rem;
  color: #fff;
}

.hero-card-caption h2 {
  margin: 0;
  font-size: clamp(1.8rem, 8vw, 3.4rem);
}

.hero-figure {
  position: absolute;
  inset: 1rem;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  color: var(--primary-dark);
  background: linear-gradient(145deg, #d6cabb, #fff8ee);
  border-radius: 20px;
}

.hero-figure svg {
  width: min(190px, 60vw);
  margin: auto;
}

/* Sections */

.section {
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.section-title {
  margin-bottom: 1rem;
  font-size: clamp(2.2rem, 10vw, 4.2rem);
  overflow-wrap: break-word;
}

.section-intro {
  max-width: 70ch;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.grid {
  display: grid;
  gap: 1.2rem;
}

.grid-3,
.grid-2 {
  grid-template-columns: 1fr;
}

.card,
.panel {
  overflow: hidden;
  padding: 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(37, 54, 47, 0.08);
}

.card h3 {
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.65rem;
}

.card p,
.muted {
  color: var(--muted);
}

.card-content {
  padding: 1.35rem;
}

.card-content h3 {
  margin-bottom: 0.5rem;
}

.card-content p {
  margin: 0;
}

.offering-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
  background: var(--surface-2);
}

.feature-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.feature-list li {
  position: relative;
  padding-left: 1.8rem;
  list-style: none;
}

.feature-list li::before {
  content: "•";
  position: absolute;
  left: 0.5rem;
  color: var(--primary);
  font-weight: 900;
}

.studio-card {
  display: grid;
  gap: 0.8rem;
}

.studio-image {
  min-height: 180px;
  border-radius: 18px;
  background: linear-gradient(135deg, #d7e2d9, #fff6e8);
}

/* Forms */

.form-grid {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.45rem;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  padding: 1rem;
  color: var(--text);
  background: #fffdf8;
  border: 1px solid var(--border);
  border-radius: 16px;
}

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

.notice {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 16px;
}

.notice.success {
  color: #24503e;
  background: #e2efe8;
}

.notice.error {
  color: #8a2f2f;
  background: #f3dfdf;
}

/* Footer */

.footer {
  padding: 4rem 0 2rem;
  margin-top: 3rem;
  background: rgba(255, 250, 243, 0.55);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.footer h2 {
  max-width: 12ch;
  font-size: clamp(2rem, 10vw, 3.5rem);
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
}

.inline-form input {
  max-width: 340px;
}

.footer-links {
  display: grid;
  align-content: start;
  gap: 0.7rem;
}

.footer-links a {
  color: var(--muted);
  font-weight: 800;
}

.footer-links a:hover {
  color: var(--primary);
}

.copyright {
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Install banner */

.install-banner[hidden] {
  display: none !important;
}

.install-banner {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: #fffaf3;
  background: #17211d;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.install-banner__content strong {
  display: block;
}

.install-banner__content p {
  margin-top: 0.2rem;
  color: #dce7df;
}

.install-banner__actions {
  display: flex;
  gap: 0.5rem;
}

.install-banner button {
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}

#install-button {
  color: #fff;
  background: var(--primary);
}

#install-close {
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* Admin */

.admin-body .site-header,
.admin-body .footer {
  display: none;
}

.admin-shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100dvh;
  background: var(--bg);
}

.admin-aside {
  position: relative;
  height: auto;
  padding: 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.admin-brand {
  margin-bottom: 2rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
}

.admin-nav {
  display: grid;
  gap: 0.6rem;
}

.admin-nav a {
  padding: 0.8rem 1rem;
  color: var(--muted);
  font-weight: 800;
  border-radius: 14px;
}

.admin-nav a:hover,
.admin-nav a.active {
  color: var(--primary-dark);
  background: var(--surface-2);
}

.admin-main {
  display: grid;
  gap: 1.5rem;
  padding: 1rem;
}

.admin-card {
  overflow-x: auto;
  padding: 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(37, 54, 47, 0.08);
}

.table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.login-page {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 1rem;
}

.login-box {
  width: min(100%, 430px);
}

.hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

/* Larger screens */

@media (min-width: 700px) {
  .header-inner {
    min-height: 78px;
    padding: 0.35rem 0;
  }

  .brand-mark {
    width: 88px;
    height: 88px;
    min-width: 88px;
    min-height: 88px;
  }

  .brand-text strong {
    font-size: 1.45rem;
  }

  .brand-text span {
    font-size: 0.72rem;
  }

  .hero-card {
    min-height: 430px;
    border-radius: 30px;
  }

  .hero-image {
    height: 430px;
  }

  .admin-shell {
    grid-template-columns: 220px 1fr;
  }

  .admin-aside {
    position: sticky;
    top: 0;
    height: 100dvh;
    border-right: 1px solid var(--border);
    border-bottom: 0;
  }

  .admin-main {
    padding: 1.5rem;
  }
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }

  .main-nav {
    position: static;
    display: flex !important;
    flex-direction: row;
    gap: 1.25rem;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .header-cta {
    display: inline-flex;
  }

  .hero-grid {
    grid-template-columns: 0.95fr 1.05fr;
  }

  .hero-card {
    min-height: 560px;
  }

  .hero-image {
    height: 560px;
  }

  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  .offering-image {
    aspect-ratio: 4 / 3;
  }

  .footer-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

@media (max-width: 899px) {
  .header-cta {
    display: none;
  }

  .install-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .install-banner__actions {
    width: 100%;
  }

  .install-banner__actions button {
    flex: 1;
  }
}

@media (max-width: 520px) {
  .brand-mark {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }

  .brand-text strong {
    font-size: 1.12rem;
  }

  .brand-text span {
    font-size: 0.62rem;
  }

  .hero-card {
    min-height: 320px;
    border-radius: 24px;
  }

  .hero-image {
    height: 320px;
  }

  .offering-image {
    aspect-ratio: 16 / 10;
  }

  .card-content {
    padding: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}