/* Luxury / Editorial - minimal magazine feel + Shoelace tokens */
:root {
  color-scheme: light;

  /* Palette */
  --paper: #fbf7f0;
  --ink: #111111;
  --muted: rgba(17, 17, 17, 0.68);
  --rule: rgba(17, 17, 17, 0.14);
  --gold: #b08a3a;

  /* Shoelace theming */
  --sl-color-primary-500: var(--gold);
  --sl-color-primary-600: #9a7831;
  --sl-color-neutral-100: #ffffff;
  --sl-color-neutral-200: #f7f1e8;
  --sl-focus-ring-color: rgba(176, 138, 58, 0.55);

  /* Editorial geometry */
  --radius: 12px;
  --col: 740px;
  --max: 1120px;
  --space: 16px;

  /* Reduce component feel */
  --sl-border-radius-small: 10px;
  --sl-border-radius-medium: 12px;
  --sl-border-radius-large: 14px;
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: -20% 0 auto;
  height: 60%;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(176, 138, 58, 0.08),
      transparent 55%
    ),
    radial-gradient(
      circle at 80% 10%,
      rgba(17, 17, 17, 0.05),
      transparent 60%
    );
  pointer-events: none;
  z-index: -1;
}

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

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

a:hover {
  text-decoration: underline;
  text-decoration-color: var(--rule);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 20px;
}

section {
  scroll-margin-top: 120px;
}

.section {
  margin-top: 56px;
}

.rule {
  height: 1px;
  background: var(--rule);
}

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

.note {
  padding: 14px;
  margin-top: 16px;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(10px);
}

.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo {
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 18px;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search {
  width: 160px;
}

.menu-button {
  display: none;
}

.ghost-btn {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: transparent;
  padding: 8px 12px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}

.ghost-btn:hover {
  color: var(--ink);
}

/* Hero */
.hero {
  padding-top: 28px;
}

.hero-grid {
  display: grid;
  gap: 36px;
}

.hero-copy {
  max-width: 640px;
}

.hero-cover {
  display: grid;
  gap: 16px;
}

.hero-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-badges {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
}

.invite {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hint {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--gold);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.cover {
  padding: 18px;
}

.cover svg {
  width: 100%;
  height: auto;
  stroke: var(--ink);
  stroke-width: 1px;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cover-grid {
  display: grid;
  gap: 12px;
}

.property-card {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.property-photo {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.6);
}

.property-photo svg {
  width: 100%;
  height: auto;
  stroke: var(--ink);
  stroke-width: 1px;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.property-info h3 {
  margin: 0;
}

/* Magazine reading column + sidebar */
.mag {
  display: grid;
  gap: 24px;
}

.reading {
  max-width: var(--col);
}

.sidebar {
  border-left: 1px solid var(--rule);
  padding-left: 18px;
}

.meta {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 12px;
  color: var(--muted);
}

/* Editorial type */
.kicker {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

h1,
h2,
.serif {
  font-family: ui-serif, Georgia, "Times New Roman", Times, serif;
}

h1 {
  margin: 10px 0 0;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  line-height: 1.04;
}

h2 {
  margin: 8px 0 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.1;
}

.subhead {
  margin-top: 22px;
  font-size: 1.2rem;
}

.standfirst {
  margin-top: 14px;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--muted);
}

.byline {
  margin-top: 12px;
  font-size: 0.95rem;
  color: var(--muted);
}

.caption {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--muted);
}

.keypoints {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 12px;
}

/* Drop cap */
.dropcap p:first-child::first-letter {
  float: left;
  font-family: ui-serif, Georgia, "Times New Roman", Times, serif;
  font-size: 3.4rem;
  line-height: 1;
  margin: 0.05em 0.14em 0 0;
  color: var(--ink);
}

/* Pull quote */
.pullquote {
  border-left: 2px solid var(--gold);
  padding-left: 16px;
  margin: 24px 0;
  font-family: ui-serif, Georgia, "Times New Roman", Times, serif;
  font-size: 1.25rem;
  line-height: 1.35;
}

.pullquote small {
  display: block;
  margin-top: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.9rem;
  color: var(--muted);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.section-head .rule {
  flex: 1;
}

/* Minimal surface */
.surface {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
}

/* Features */
.feature-grid {
  display: grid;
  gap: 16px;
}

.feature {
  padding: 18px;
}

/* Properties */
.property-grid {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.property {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.property-body h3 {
  margin: 0;
}

.property-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Issues */
.issues-panel {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.toc {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  border-top: 1px solid var(--rule);
}

.toc li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
}

.toc em {
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
}

.editors-note {
  padding: 18px;
  color: var(--muted);
}

/* Social proof */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.logo-mark {
  padding: 14px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.logo-mark svg {
  width: 100%;
  height: 28px;
  stroke: var(--ink);
  stroke-width: 1px;
}

.logo-mark text {
  fill: var(--ink);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.testimonials {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.testimonial {
  padding: 18px 20px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

/* Pricing */
.model-grid {
  display: grid;
  gap: 24px;
}

.model-text {
  padding: 10px 0;
}

.pricing-grid {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.tier {
  padding: 22px;
  display: grid;
  gap: 12px;
}

.tier ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.price {
  font-size: 1.4rem;
  margin: 0;
}

/* FAQ */
.faq-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

/* Team */
.team-grid {
  display: grid;
  gap: 18px;
}

.team {
  padding: 20px;
  display: grid;
  gap: 12px;
}

.team-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
  color: var(--muted);
}

.team-list strong {
  color: var(--ink);
  font-weight: 600;
}

.team-list span {
  display: block;
  font-size: 0.88rem;
  margin-top: 4px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--rule);
  margin-top: 80px;
  padding-top: 40px;
}

.footer-grid {
  display: grid;
  gap: 24px;
}

.footer-links {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Drawer */
.drawer-content {
  display: grid;
  gap: 16px;
}

.drawer-nav {
  display: grid;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
}

.drawer-cta {
  display: grid;
  gap: 12px;
}

/* Dialog */
.subscribe-form {
  display: grid;
  gap: 16px;
}

.dialog-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Shoelace parts */
sl-button.ed::part(base),
sl-input.ed::part(base) {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

sl-button.ed::part(base) {
  background: transparent;
}

sl-button.ed[variant="primary"]::part(base) {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

sl-input.ed::part(base) {
  background: rgba(255, 255, 255, 0.7);
}

sl-badge::part(base) {
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

sl-tab-group::part(nav) {
  border-bottom: 1px solid var(--rule);
}

sl-tab::part(base) {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

sl-tab[active]::part(base) {
  color: var(--ink);
}

sl-details::part(base) {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.45);
}

sl-dialog::part(panel),
sl-drawer::part(panel) {
  border-radius: var(--radius);
  background: var(--paper);
}

/* Reading progress bar */
#progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 2000;
}

/* Animation */
.reveal {
  animation: rise 700ms ease both;
  animation-delay: var(--d, 0ms);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (min-width: 980px) {
  .mag {
    grid-template-columns: minmax(0, var(--col)) 320px;
    align-items: start;
  }

  .sidebar {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 110px;
  }

  .pullquote--cross {
    grid-column: 2 / 3;
    grid-row: 2;
    margin-left: -120px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    align-items: center;
  }

  .cover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .issues-panel {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }

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

  .model-grid {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
  }

  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

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

  .menu-button {
    display: inline-flex;
  }

  .search {
    display: none;
  }

  .topbar-actions {
    gap: 8px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-head .rule {
    width: 100%;
  }
}

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

  .reveal {
    animation: none;
  }

  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Night edition */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0e0e0e;
  --ink: #f3efe6;
  --muted: rgba(243, 239, 230, 0.68);
  --rule: rgba(243, 239, 230, 0.16);
}

:root[data-theme="dark"] .surface {
  background: rgba(14, 14, 14, 0.7);
}

:root[data-theme="dark"] sl-input.ed::part(base) {
  background: rgba(14, 14, 14, 0.7);
}

:root[data-theme="dark"] .property-photo {
  background: rgba(14, 14, 14, 0.7);
}

:root[data-theme="dark"] body::before {
  background: radial-gradient(
      circle at 20% 20%,
      rgba(176, 138, 58, 0.12),
      transparent 55%
    ),
    radial-gradient(
      circle at 80% 10%,
      rgba(243, 239, 230, 0.06),
      transparent 60%
    );
}
