/* TRS World – static site styles
   Palette taken from the TRS World logo: deep navy + gold. Dark by default, light option available. */

:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0A1830;
  --tint: #0E2040;
  --surface: #11264A;
  --text: #F3EFE4;
  --muted: #B8C4D8;
  --accent: #E2B04A;
  --line: #2F4778;
  --btn-bg: #E2B04A;
  --btn-fg: #0A1830;
  --focus: #FFD97A;
  --glow: rgba(226, 176, 74, .18);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #FBF8F1;
  --tint: #F2EDE0;
  --surface: #FFFFFF;
  --text: #0E1B33;
  --muted: #3F4C66;
  --accent: #7A5400;
  --line: #C9C1AC;
  --btn-bg: #0E2347;
  --btn-fg: #FBF8F1;
  --focus: #0A58CA;
  --glow: rgba(14, 35, 71, .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6.5rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.65;
  overflow-wrap: break-word;
  -webkit-tap-highlight-color: transparent;
}
@media (max-width: 30rem) { body { font-size: 1.0625rem; } }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  line-height: 1.2;
  margin: 0 0 .6em;
  font-weight: 700;
}
h1 { font-size: clamp(2.8rem, 8vw, 5.5rem); letter-spacing: -0.01em; margin-bottom: .2em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; margin-bottom: .3em; }
p { margin: 0 0 1em; max-width: 68ch; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: .14em; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1200px, 100% - clamp(2rem, 8vw, 5rem) - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); margin-inline: auto; }

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

.skip-link {
  position: absolute; left: 1rem; top: -5rem;
  background: var(--btn-bg); color: var(--btn-fg);
  padding: .75rem 1.1rem; z-index: 100; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); box-shadow: 0 6px 18px -12px rgba(0, 0, 0, .6); }
.header-inner { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem 1rem; min-height: 4.5rem; padding-block: .35rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--text); text-decoration: none; min-height: 48px; }
.brand-logo { width: 48px; height: 48px; }
.brand-name { font-family: "Source Serif 4", Georgia, serif; font-weight: 700; font-size: 1.45rem; }

.header-actions { display: flex; gap: .5rem; margin-left: auto; }
.icon-btn {
  width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text);
  border: 2px solid var(--line); border-radius: 12px; cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 22px; height: 22px; }
:root[data-theme="dark"] .icon-moon, :root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun, :root[data-theme="light"] .icon-moon { display: block; }

/* Nav: visible without JavaScript; JS turns it into a collapsible menu on small screens */
.site-nav { flex-basis: 100%; max-height: calc(100vh - 6rem); max-height: calc(100dvh - 6rem); overflow-y: auto; overscroll-behavior: contain; }
.site-nav ul { list-style: none; margin: 0; padding: 0 0 .75rem; display: flex; flex-direction: column; }
.site-nav a {
  display: flex; align-items: center; min-height: 48px; padding: .5rem .25rem;
  color: var(--text); text-decoration: none; font-weight: 700; border-top: 1px solid var(--line);
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="location"] { color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); padding-left: .9rem; }
.menu-btn { display: none; }
.js .menu-btn { display: inline-flex; }
.js .site-nav[hidden] { display: none; }

@media (min-width: 66rem) {
  .js .menu-btn { display: none; }
  .js .site-nav[hidden] { display: block; }
  .header-inner { flex-wrap: nowrap; }
  .site-nav { flex-basis: auto; order: 2; margin-left: auto; max-height: none; overflow: visible; }
  .header-actions { order: 3; margin-left: 0; }
  .site-nav ul { flex-direction: row; gap: .15rem; padding: 0; }
  .site-nav a { border-top: 0; padding: .5rem .8rem; font-size: 1rem; border-radius: 10px; }
  .site-nav a[aria-current="location"] { box-shadow: inset 0 -3px 0 var(--accent); border-radius: 10px 10px 0 0; padding-left: .8rem; }
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(2.5rem, 7vw, 6.5rem) 0 clamp(3rem, 7vw, 6rem);
  background: radial-gradient(ellipse 60% 70% at 78% 40%, var(--glow), transparent 70%);
  overflow: hidden;
}
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.hero-art { order: -1; justify-self: center; width: clamp(180px, 52vw, 300px); }
.hero-art img { width: 100%; filter: drop-shadow(0 12px 32px rgba(0, 0, 0, .35)); }
.tagline {
  font-family: "Source Serif 4", Georgia, serif; font-weight: 600; color: var(--accent);
  font-size: clamp(1.35rem, 3vw, 2.1rem); line-height: 1.3; max-width: 24ch; margin-bottom: 1.1rem;
}
.lead { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin: 1.8rem 0 0; }

@media (min-width: 52rem) {
  .hero-grid { grid-template-columns: 1.25fr 1fr; gap: 3rem; }
  .hero-art { order: 0; width: 100%; max-width: 440px; justify-self: end; }
}
@media (min-width: 90rem) { .hero-art { max-width: 500px; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 50px; padding: .75rem 1.6rem; border-radius: 12px;
  font-weight: 700; font-size: 1.05rem; text-decoration: none; border: 2px solid transparent;
  transition: transform .15s ease, filter .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-quiet { color: var(--text); border-color: var(--line); background: transparent; }
.btn-quiet:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 30rem) { .hero-cta .btn { flex: 1 1 100%; } }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 6rem) 0; border-top: 1px solid var(--line); }
.section.tint { background: var(--tint); }
.split { display: grid; gap: 1rem 4rem; }
@media (min-width: 52rem) { .split { grid-template-columns: 1fr 1.7fr; } .split > h2 { margin: 0; } }
.section-intro { color: var(--muted); margin-bottom: 2rem; }

.statements { display: grid; gap: 2rem; margin: 1.5rem 0 3.5rem; }
@media (min-width: 52rem) { .statements { grid-template-columns: 1fr 1fr; gap: 3.5rem; } }
.statement { border-left: 4px solid var(--accent); padding-left: 1.3rem; }
.statement p { font-size: clamp(1.1rem, 1.8vw, 1.25rem); margin: 0; }

.values-title { margin-bottom: 1rem; }
.values { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 3rem; }
.values li { padding: 1rem 0; border-top: 1px solid var(--line); }
.values p { margin: 0; color: var(--muted); }
@media (min-width: 44rem) { .values { grid-template-columns: 1fr 1fr; } }
@media (min-width: 70rem) { .values { grid-template-columns: repeat(3, 1fr); } }

/* Product */
.product {
  display: grid; gap: 1.5rem; align-items: end; margin-top: 1.5rem;
  background: var(--surface); border: 2px solid var(--line); border-radius: 18px;
  padding: clamp(1.5rem, 4vw, 3rem);
}
.product h3 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: .15em; }
.product-logo { display: block; width: 100%; max-width: 480px; height: auto; border-radius: 12px; margin-bottom: 1.2rem; }
.product-status { color: var(--accent); font-weight: 700; margin-bottom: .8rem; }
.product-body p:last-child { margin-bottom: 0; }
.product-link { margin: 0; }
@media (min-width: 52rem) { .product { grid-template-columns: 1fr auto; gap: 3rem; } }
@media (max-width: 30rem) { .product-link .btn { width: 100%; } }

/* Future initiatives */
.initiatives { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem; }
@media (min-width: 44rem) { .initiatives { grid-template-columns: 1fr 1fr; gap: 2.25rem 3.5rem; } }
@media (min-width: 80rem) { .initiatives { grid-template-columns: repeat(4, 1fr); gap: 2rem; } }
.initiatives li { border-top: 3px solid var(--line); padding-top: 1rem; }
.initiatives h3 { margin-bottom: .35em; }
.initiatives p { margin-bottom: .6em; }
.status { color: var(--muted); font-size: 1rem; font-weight: 700; }

/* Contact */
.contact-list { list-style: none; margin: 1.3rem 0 0; padding: 0; max-width: 40rem; }
.contact-list li { padding: .8rem 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .15rem 1.5rem; align-items: baseline; }
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.contact-list .label { font-weight: 700; min-width: 6.5rem; }
.contact-list a { overflow-wrap: anywhere; font-size: 1.1rem; display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--tint); color: var(--muted); padding: clamp(2.5rem, 5vw, 4rem) 0 calc(1.5rem + env(safe-area-inset-bottom, 0px)); }
.footer-grid { display: grid; gap: 2.2rem; }
@media (min-width: 44rem) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; gap: 3rem; } }
.footer-logo { width: 64px; height: 64px; margin-bottom: .8rem; }
.footer-brand { font-family: "Source Serif 4", Georgia, serif; font-weight: 700; font-size: 1.35rem; color: var(--text); margin-bottom: .3rem; }
.footer-heading { font-size: 1.05rem; color: var(--text); margin-bottom: .8rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.footer-bottom p { margin: 0; font-size: 1rem; }
.footer-bottom a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Polish: brand look and feel ---------- */
button, .btn, a { touch-action: manipulation; }
.btn-primary { background-image: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0)); box-shadow: 0 8px 22px -10px rgba(0, 0, 0, .55); }
.btn:active, .icon-btn:active { transform: scale(.98); }
.btn-primary:hover { transform: translateY(-1px); }

.section h2::after { content: ""; display: block; width: 56px; height: 4px; border-radius: 4px; margin-top: .45em; background: linear-gradient(90deg, var(--accent), transparent); }
.split > h2::after { margin-bottom: .4rem; }

.hero-art img { transition: transform .4s ease; }
@media (hover: hover) { .hero-art img:hover { transform: scale(1.03) rotate(-1deg); } }

.highlights { list-style: none; margin: clamp(2rem, 5vw, 3.5rem) 0 0; padding: 0; display: grid; gap: .9rem; }
.highlights li { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 14px; padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: .2rem; }
.highlights strong { font-family: "Source Serif 4", Georgia, serif; font-size: 1.15rem; }
.highlights span { color: var(--muted); font-size: 1rem; line-height: 1.5; }
@media (min-width: 44rem) { .highlights { grid-template-columns: repeat(3, 1fr); gap: 1.2rem; } }

.values { gap: 1rem; }
.values li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem 1.3rem; transition: border-color .2s ease, transform .2s ease; }
.initiatives { gap: 1rem; }
.initiatives li { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 14px; padding: 1.2rem 1.3rem; transition: border-color .2s ease, transform .2s ease; }
@media (hover: hover) { .values li:hover, .initiatives li:hover { border-color: var(--accent); transform: translateY(-2px); } }
@media (min-width: 44rem) { .values, .initiatives { gap: 1.2rem; } }
@media (min-width: 80rem) { .initiatives { gap: 1.2rem; } }
.statement { background: var(--surface); border-radius: 0 14px 14px 0; padding: 1.2rem 1.3rem 1.2rem 1.3rem; }
.product { box-shadow: 0 24px 60px -34px rgba(0, 0, 0, .7); }
.product-logo { box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .6); }

.contact-cta { margin: 1.2rem 0 .4rem; }
@media (max-width: 30rem) { .contact-cta .btn { width: 100%; } }
.contact-list li { min-height: 56px; }

.legal-links { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.legal-links li a { min-height: 44px; }

/* Scroll reveal (only when JavaScript runs and motion is allowed) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Policy pages ---------- */
.header-inner.simple { flex-wrap: nowrap; }
.header-inner.simple .header-actions { align-items: center; }
.header-inner.simple .btn { min-height: 48px; padding: .5rem 1.1rem; font-size: 1rem; }
.doc { padding: clamp(2.2rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem); }
.doc-inner { max-width: 46rem; }
.doc h1 { font-size: clamp(2rem, 6vw, 3.2rem); margin-bottom: .3em; }
.doc h1::after { content: ""; display: block; width: 64px; height: 4px; border-radius: 4px; margin-top: .4em; background: linear-gradient(90deg, var(--accent), transparent); }
.doc-meta { color: var(--muted); font-size: 1rem; margin-bottom: 1.6rem; }
.doc h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin-top: 2.2rem; margin-bottom: .5em; }
.doc ul { padding-left: 1.25rem; margin: 0 0 1em; max-width: 68ch; }
.doc li { margin-bottom: .55em; }
.doc a { overflow-wrap: anywhere; }
.doc .note { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 1rem 1.2rem; margin: 1.2rem 0 0; }
.doc .note p:last-child { margin-bottom: 0; }

/* ---------- 404 ---------- */
.notfound { padding: clamp(4rem, 12vw, 9rem) 0; }
.notfound h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }

/* ---------- Contrast / forced colors / print ---------- */
@media (forced-colors: active) {
  .btn, .icon-btn, .product { border: 2px solid CanvasText; }
  .brand-logo, .hero-art img { forced-color-adjust: none; }
}
@media print {
  .reveal { opacity: 1 !important; transform: none !important; }
  .site-header, .skip-link, .hero-art, .menu-btn { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
}
