/* Ludus Altus Limited — responsive site styles */

:root {
  --surface-primary: #f0f4f1;
  --surface-soft: #e5ede7;
  --surface-dark: #14261c;
  --surface-card: #ffffff;
  --surface-elevated: #1e3428;
  --surface-icon-dark: #2a4a38;

  --fg-primary: #1b3a28;
  --fg-secondary: #4a6b52;
  --fg-muted: #6b8574;
  --fg-inverse: #ffffff;
  --fg-on-dark: #e8f0eb;
  --fg-on-dark-muted: #8aa996;

  --accent: #2d8a5e;
  --accent-soft: #a8c5b0;
  --accent-bright: #4caf7a;
  --border-subtle: #d6ddd0;
  --glass: rgba(255, 255, 255, 0.85);

  --radius: 8px;
  --radius-lg: 12px;
  --shadow-soft: 0 1px 3px #00000008, 0 4px 12px #0000000a;

  --container: 1120px;
  --header-h: 64px;
  --space: clamp(1rem, 2.5vw, 2rem);
  --section-y: clamp(3rem, 8vw, 6.5rem);

  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Funnel Sans", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--fg-primary);
  background: var(--surface-primary);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

address {
  font-style: normal;
}

button {
  font: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--fg-inverse);
}

.skip-link:focus {
  top: 1rem;
}

#top {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  opacity: 0.92;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--fg-inverse);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--surface-primary) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo {
  width: auto;
  height: 36px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.btn-download {
  padding: 0.35rem 0.6rem;
  font-size: 0.6875rem;
  min-height: 30px;
  gap: 0;
}

.btn-download .icon {
  display: none;
}

.menu-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.menu-toggle-bar {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--fg-primary);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--header-h);
  background: var(--surface-primary);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 1.25rem 1.25rem;
  display: none;
}

.nav.is-open {
  display: block;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-list a {
  display: block;
  padding: 0.75rem 0.5rem;
  color: var(--fg-secondary);
  font-weight: 500;
  font-size: 0.9375rem;
  border-radius: var(--radius);
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--fg-primary);
  background: var(--surface-soft);
}

body.nav-open {
  overflow: hidden;
}

/* Hero */

.hero {
  position: relative;
  min-height: clamp(28rem, 78vw, 35rem);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 78% center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #14261cee 0%, #14261c88 50%, #14261c33 100%);
}

.hero-layout {
  position: relative;
  z-index: 1;
  padding-block: 3rem;
  display: flex;
  justify-content: center;
}

.hero-card {
  width: min(100%, 40rem);
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 1.125rem;
  justify-items: center;
  text-align: center;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-card h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 7vw, 3.25rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--fg-primary);
}

.hero-lead {
  color: var(--fg-secondary);
  font-size: 0.9375rem;
  line-height: 1.55;
  max-width: 36ch;
}

.hero-card .btn {
  width: fit-content;
}

/* Sections */

.section {
  padding-block: var(--section-y);
}

.section-dark {
  background: var(--surface-dark);
  color: var(--fg-on-dark);
}

.section-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.625rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
}

.section-title.centered {
  text-align: center;
}

.section-kicker {
  color: var(--accent);
  font-weight: 500;
  font-size: 1rem;
}

/* Intro */

.intro-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.intro-visual {
  margin: 0 auto;
  width: 100%;
  max-width: 22rem;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  background: transparent;
  padding: 0.75rem;
  box-sizing: border-box;
  justify-self: center;
}

.intro-phone {
  width: min(15.375rem, 78%);
  aspect-ratio: 280 / 518;
  border-radius: 20px;
  overflow: hidden;
  background: #111;
  box-shadow:
    0 0 0 4px #ffffff,
    0 8px 8px #2d8a5f40;
  flex-shrink: 0;
  position: relative;
  z-index: 0;
}

.intro-phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.intro-copy {
  display: grid;
  gap: 1rem;
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  justify-items: center;
  text-align: center;
}

.intro-copy h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.75rem, 5vw, 2.625rem);
  font-weight: 600;
}

.intro-copy > p {
  color: var(--fg-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
  max-width: 40rem;
}

.highlight-list {
  display: grid;
  gap: 1rem;
  margin-top: 0.5rem;
  width: 100%;
  max-width: 36rem;
  text-align: left;
  justify-items: stretch;
}

.highlight-list li {
  display: grid;
  grid-template-columns: 0.5rem 1fr;
  gap: 0.25rem 0.75rem;
  text-align: left;
}

.highlight-list li::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
}

.highlight-list strong {
  grid-column: 2;
  color: var(--fg-primary);
  font-size: 0.9375rem;
  text-align: left;
}

.highlight-list span {
  grid-column: 2;
  color: var(--fg-muted);
  font-size: 0.8125rem;
  line-height: 1.5;
  text-align: left;
}

/* Features */

.features .section-title {
  color: var(--fg-inverse);
  margin-bottom: 1.75rem;
}

.feature-grid {
  display: grid;
  gap: 0.75rem;
}

.feature-card,
.contact-card {
  background: var(--surface-elevated);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: grid;
  gap: 1rem;
  box-shadow: var(--shadow-soft);
  justify-items: center;
  text-align: center;
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.625rem;
  background: var(--surface-icon-dark);
  color: var(--accent-bright);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--fg-on-dark);
}

.feature-card p {
  color: var(--fg-on-dark-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* About */

.about-layout {
  display: grid;
  gap: 2rem;
  justify-items: center;
}

.about-copy {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: none;
  justify-items: center;
  text-align: center;
}

.about-copy h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 600;
}

.about-copy p {
  color: var(--fg-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.value-grid {
  display: grid;
  gap: 1rem;
  width: 100%;
  text-align: left;
}

.value-item {
  padding: 0.75rem 0 0.75rem 1rem;
  border-left: 3px solid var(--accent);
  display: grid;
  gap: 0.5rem;
  justify-items: start;
  text-align: left;
}

.value-icon {
  color: var(--accent);
  width: 1.375rem;
  height: 1.375rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.value-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.value-item h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
}

.value-item p {
  color: var(--fg-muted);
  font-size: 0.8125rem;
}

/* Contact */

.contact-layout {
  display: grid;
  gap: 1.5rem;
}

.contact-intro {
  display: grid;
  gap: 0.75rem;
  justify-items: center;
  text-align: center;
}

.contact .section-title {
  color: var(--fg-inverse);
}

.contact-lead {
  color: var(--accent-soft);
  font-size: 0.9375rem;
  max-width: 40rem;
  line-height: 1.55;
}

.contact-grid {
  display: grid;
  gap: 0.75rem;
}

.contact-label {
  color: var(--fg-on-dark-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-value {
  color: var(--fg-on-dark);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.45;
  word-break: break-word;
}

.contact-value:hover {
  color: var(--accent-bright);
}

/* Footer */

.site-footer {
  background: var(--surface-primary);
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  padding-bottom: 2rem;
  justify-items: center;
  text-align: center;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.footer-logo img {
  width: auto;
  height: 48px;
  max-width: 185px;
  object-fit: contain;
  object-position: center;
}

.footer-brand {
  display: grid;
  justify-items: center;
}

.footer-brand > p {
  color: var(--fg-muted);
  font-size: 0.8125rem;
  line-height: 1.55;
  max-width: 28rem;
  text-align: center;
}

.footer-heading {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  text-align: center;
}

.footer-heading-spaced {
  margin-top: 1.5rem;
}

.footer-col {
  display: grid;
  justify-items: center;
  text-align: center;
}

.footer-col ul {
  display: grid;
  gap: 0.75rem;
  justify-items: center;
}

.footer-col a {
  color: var(--fg-secondary);
  font-size: 0.875rem;
}

.footer-col a:hover {
  color: var(--fg-primary);
}

.footer-bottom {
  padding-block: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.footer-bottom p {
  color: var(--fg-muted);
  font-size: 0.6875rem;
}

/* Legal pages */

.legal-main {
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 8vw, 5rem);
  background: var(--surface-primary);
}

.legal-wrap {
  max-width: 48rem;
  display: grid;
  gap: 1.25rem;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9375rem;
  min-height: 44px;
  padding: 0.25rem 0.15rem;
  border-radius: var(--radius);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.legal-back:hover,
.legal-back:focus-visible {
  color: var(--fg-primary);
  background: var(--surface-soft);
}

.legal-back-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.legal-article {
  display: grid;
  gap: 0.9rem;
}

.legal-article h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 600;
  color: var(--fg-primary);
  line-height: 1.2;
  margin-top: 0.25rem;
}

.legal-article h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 600;
  color: var(--fg-primary);
  margin-top: 1.25rem;
  line-height: 1.3;
}

.legal-article h3 {
  font-family: "Funnel Sans", system-ui, sans-serif;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--fg-primary);
  margin-top: 0.75rem;
}

.legal-meta {
  color: var(--fg-muted) !important;
  font-size: 0.875rem !important;
}

.legal-article p,
.legal-article li {
  color: var(--fg-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.legal-article a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-article a:hover {
  color: var(--fg-primary);
}

.legal-article ul {
  list-style: disc;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.45rem;
  margin: 0.15rem 0 0.35rem;
}

.legal-copy {
  margin-top: 1rem;
  color: var(--fg-muted) !important;
  font-size: 0.875rem !important;
}

/* Back to top */

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--fg-inverse);
  box-shadow: 0 8px 20px #1b3a2840;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background-color 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: #247a52;
}

.back-to-top svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

/* Tablet */

@media (min-width: 640px) {
  .brand-logo {
    height: 40px;
  }

  .btn-download {
    padding: 0.4rem 0.7rem;
    font-size: 0.75rem;
    min-height: 32px;
  }

  .hero-card {
    padding: 1.75rem;
    gap: 1.25rem;
  }

  .hero-card .btn {
    width: fit-content;
  }

  .feature-grid,
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1.2fr;
    gap: 2.5rem;
    align-items: start;
  }
}

/* Desktop */

@media (min-width: 960px) {
  :root {
    --header-h: 80px;
  }

  .container {
    width: min(100% - 5rem, var(--container));
  }

  .menu-toggle {
    display: none;
  }

  .nav {
    position: static;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .nav-list {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
  }

  .nav-list a {
    padding: 0;
  }

  .nav-list a:hover,
  .nav-list a:focus-visible {
    background: transparent;
  }

  .header-inner {
    gap: 2rem;
  }

  .nav {
    margin-left: auto;
  }

  .header-actions {
    margin-left: 0;
  }

  .btn-download {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    min-height: 44px;
    gap: 0.5rem;
  }

  .btn-download .icon {
    display: block;
    width: 1rem;
    height: 1rem;
  }

  .hero {
    min-height: 45rem;
  }

  .hero-media img {
    object-position: center center;
  }

  .hero-overlay {
    background: linear-gradient(180deg, #14261ce6 0%, #14261c66 55%, #14261c22 100%);
  }

  .hero-layout {
    padding-block: 7rem;
    display: block;
    justify-content: unset;
  }

  .hero-card {
    width: min(100%, 40rem);
    padding: 2.5rem;
    gap: 1.75rem;
    justify-items: start;
    text-align: left;
  }

  .hero-card .btn {
    width: fit-content;
  }

  .hero-lead {
    font-size: 1.0625rem;
    max-width: none;
  }

  .intro-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 4rem;
    align-items: center;
  }

  .intro-visual {
    margin: 0;
    max-width: none;
    width: 100%;
    aspect-ratio: 608 / 550;
    min-height: 0;
    justify-self: stretch;
  }

  .intro-phone {
    width: 280px;
  }

  .intro-copy {
    justify-items: start;
    text-align: left;
  }

  .intro-copy > p {
    font-size: 1rem;
    max-width: none;
  }

  .highlight-list {
    text-align: left;
    max-width: none;
  }

  .highlight-list span {
    font-size: 0.9375rem;
  }

  .feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .features .section-title {
    margin-bottom: 3.5rem;
  }

  .feature-card,
  .contact-card {
    padding: 1.75rem;
    gap: 1rem;
    justify-items: start;
    text-align: left;
  }

  .about-layout {
    gap: 3rem;
    justify-items: stretch;
  }

  .about-copy {
    justify-items: center;
    text-align: center;
    max-width: none;
    margin-inline: 0;
    width: 100%;
  }

  .about-copy p {
    font-size: 1.0625rem;
  }

  .value-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
  }

  .value-item h3 {
    font-size: 1.5rem;
  }

  .value-item p {
    font-size: 0.9375rem;
  }

  .contact-grid {
    gap: 1.5rem;
  }

  .contact-value {
    font-size: 1.125rem;
  }

  .site-footer {
    padding-top: 4rem;
    text-align: left;
  }

  .footer-grid {
    justify-items: start;
    text-align: left;
  }

  .footer-logo {
    justify-content: flex-start;
  }

  .footer-logo img {
    height: 48px;
    object-position: left center;
  }

  .footer-brand {
    justify-items: start;
  }

  .footer-brand > p {
    text-align: left;
    font-size: 0.875rem;
  }

  .footer-heading {
    text-align: left;
  }

  .footer-col {
    justify-items: start;
    text-align: left;
  }

  .footer-col ul {
    justify-items: start;
  }

  .footer-col a {
    font-size: 0.875rem;
  }

  .footer-bottom {
    text-align: center;
  }

  .footer-bottom p {
    font-size: 0.8125rem;
  }
}

@media (min-width: 1200px) {
  :root {
    --container: 1280px;
  }

  .container {
    width: min(100% - 10rem, var(--container));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .menu-toggle-bar,
  .back-to-top {
    transition: none;
  }
}
