/* ==========================================================================
   Choutes — official website stylesheet
   Dark theme is the default. Light theme is applied with html[data-theme="light"].
   Design device: chamfered (45°) corners and angled section edges taken from
   the slash in the Choutes logo.
   ========================================================================== */

:root {
  color-scheme: dark;

  --bg: #0d0b1e;
  --bg-alt: #120f2b;
  --surface: #1a1640;
  --surface-2: #231d56;
  --line: #2e2766;
  --text: #ece9ff;
  --muted: #a9a3d4;
  --accent: #6a3dff;
  --accent-strong: #5b21ff;
  --accent-soft: #9a7bff;
  --on-accent: #ffffff;
  --live: #4ade80;
  --focus: #b9a5ff;
  --header-bg: rgba(13, 11, 30, 0.82);

  --font-display: "Chakra Petch", "Eurostile", "Bahnschrift", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --chamfer: 16px;
  --cut: clamp(28px, 4.5vw, 64px);
  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f6f5ff;
  --bg-alt: #ecebfb;
  --surface: #ffffff;
  --surface-2: #e4e1fb;
  --line: #d3cff3;
  --text: #17133a;
  --muted: #565088;
  --accent: #4b00ff;
  --accent-strong: #3d00d6;
  --accent-soft: #6a3dff;
  --on-accent: #ffffff;
  --live: #15803d;
  --focus: #4b00ff;
  --header-bg: rgba(246, 245, 255, 0.86);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent-soft); text-underline-offset: 3px; }
a:hover { color: var(--text); }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.005em; }
ul { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--accent); color: #fff; }

/* Language switching: every translatable element carries data-l="en" or data-l="ms". */
html[lang="en"] [data-l="ms"],
html[lang="ms"] [data-l="en"] { display: none !important; }

/* Theme-specific images */
html:not([data-theme="light"]) .only-light { display: none !important; }
html[data-theme="light"] .only-dark { display: none !important; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px; text-decoration: none; font-weight: 700;
}
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Chamfer device ---------- */
.chamfer,
.seg, .icon-btn, .badge, .hero-status, .cloud, .legal-links, .form {
  clip-path: polygon(var(--chamfer) 0, 100% 0, 100% calc(100% - var(--chamfer)), calc(100% - var(--chamfer)) 100%, 0 100%, 0 var(--chamfer));
}

/* ---------- Buttons ---------- */
.btn {
  --chamfer: 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 26px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem; letter-spacing: .01em;
  text-decoration: none; cursor: pointer; border: 0; white-space: nowrap;
  background: var(--accent); color: var(--on-accent);
  clip-path: polygon(var(--chamfer) 0, 100% 0, 100% calc(100% - var(--chamfer)), calc(100% - var(--chamfer)) 100%, 0 100%, 0 var(--chamfer));
  transition: background-color .18s ease, color .18s ease;
}
.btn:hover { background: var(--accent-strong); color: #fff; }
.btn:focus-visible { outline: 3px solid var(--text); outline-offset: -6px; }
.btn--ghost { background: var(--surface-2); color: var(--text); }
.btn--ghost:hover { background: var(--line); color: var(--text); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: .975rem; --chamfer: 10px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 22px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 30px; width: auto; }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a {
  white-space: nowrap;
  display: block; padding: 10px 14px; color: var(--muted); text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--text); }
.nav a[aria-current="true"] { color: var(--text); border-bottom-color: var(--accent-soft); }
.header-tools { display: flex; align-items: center; gap: 10px; }

.seg { display: inline-flex; background: var(--surface); padding: 3px; --chamfer: 8px; }
.seg button {
  font: 700 .875rem var(--font-display); letter-spacing: .02em;
  min-width: 42px; min-height: 36px; padding: 0 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.seg button:not([aria-pressed="true"]):hover { color: var(--text); }
.seg button:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border: 0; cursor: pointer;
  background: var(--surface); color: var(--text); --chamfer: 9px;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
html[data-theme="light"] .theme-toggle .i-sun { display: block; }
html[data-theme="light"] .theme-toggle .i-moon { display: none; }
.menu-toggle { display: none; }

@media (max-width: 1120px) { .header-cta { display: none; } }
@media (max-width: 960px) {
  .menu-toggle { display: inline-grid; }
  .header-cta { display: none; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px; display: none; margin: 0;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.125rem; }
  .header-tools { margin-left: auto; }
}
@media (max-width: 420px) {
  .brand img { height: 24px; }
  .site-header .wrap { gap: 12px; }
}

/* ---------- Sections ---------- */
.section { position: relative; padding-block: clamp(64px, 9vw, 116px); }
.section--alt {
  background: var(--bg-alt);
  clip-path: polygon(0 var(--cut), 100% 0, 100% calc(100% - var(--cut)), 0 100%);
  padding-block: calc(clamp(64px, 9vw, 116px) + var(--cut));
  margin-block: calc(var(--cut) * -0.5);
}
.section-head { max-width: 46rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 700; }
.section-head p { color: var(--muted); font-size: 1.1875rem; margin: 0; }
.lead { font-size: 1.25rem; color: var(--muted); max-width: 40rem; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(56px, 8vw, 104px) calc(clamp(56px, 8vw, 104px) + 24px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.9rem); font-weight: 700; font-style: italic; letter-spacing: -0.02em; line-height: 1.02;
  margin-bottom: .45em;
}
.hero h1 [data-l] { display: block; }
.hero h1 .ln { display: block; }
.hero .lead { margin-bottom: 1.8em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-art { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.hero-art::before {
  content: ""; position: absolute; inset: 6% 0 6% 8%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 55%, transparent), transparent 72%);
  opacity: .55; filter: blur(8px);
}
html[data-theme="light"] .hero-art::before { opacity: .22; }
.hero-art img { position: relative; width: min(100%, 460px); height: auto; align-self: center; }
.hero-status {
  position: relative; z-index: 2; align-self: flex-start;
  background: var(--surface); padding: 16px 22px 16px 20px; --chamfer: 14px;
  display: grid; gap: 2px; min-width: 250px;
}
.hero-status b { font-family: var(--font-display); font-size: 1.125rem; }
.hero-status small { color: var(--muted); font-size: .9375rem; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--live); margin-right: 8px; vertical-align: 1px; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { max-width: 460px; margin-inline: auto; width: 100%; }
}

/* One orchestrated entrance: the slash of the mark sweeps in, the headline follows. */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 .ln { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .hero h1 .ln + .ln { animation-delay: .12s; }
  .hero .lead, .hero-actions { animation: rise .7s .26s cubic-bezier(.2,.7,.2,1) both; }
  .hero-art img { animation: sweep .9s .1s cubic-bezier(.2,.7,.2,1) both; }
  .hero-status { animation: rise .7s .5s cubic-bezier(.2,.7,.2,1) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes sweep { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }

/* ---------- Facts strip ---------- */
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.facts li { padding: 22px 24px; border-left: 3px solid var(--accent); background: var(--surface); }
.facts li + li { margin-left: 3px; }
.facts b { display: block; font-family: var(--font-display); font-size: 1.1875rem; }
.facts span { color: var(--muted); font-size: .9875rem; }
@media (max-width: 900px) { .facts { grid-template-columns: 1fr 1fr; gap: 3px; } .facts li + li { margin-left: 0; } }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 88px); align-items: start; }
.about-grid h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
.values { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.values li { padding-left: 20px; border-left: 3px solid var(--accent); }
.values b { display: block; font-family: var(--font-display); font-size: 1.25rem; margin-bottom: 2px; }
.values span { color: var(--muted); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- Services (rows, not cards) ---------- */
.service-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.service {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) auto; gap: 12px 40px; align-items: center;
  padding: 30px 0; border-bottom: 1px solid var(--line);
}
.service h3 { font-size: 1.75rem; margin: 0; font-weight: 700; }
.service p { margin: 0; color: var(--muted); }
.badge {
  display: inline-block; padding: 5px 14px; font: 700 .875rem var(--font-display); letter-spacing: .02em;
  background: var(--surface-2); color: var(--text); --chamfer: 7px; white-space: nowrap;
}
.badge--live { background: color-mix(in srgb, var(--live) 22%, var(--surface)); color: var(--text); }
.badge--live::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--live); margin-right: 8px; }
@media (max-width: 820px) { .service { grid-template-columns: 1fr; padding: 26px 0; } }

/* ---------- Cloud spotlight ---------- */
.cloud {
  position: relative; background: var(--surface); --chamfer: 34px; overflow: hidden;
  padding: clamp(28px, 5vw, 64px);
}
.cloud::after {
  content: ""; position: absolute; right: -8%; top: -30%; width: 46%; height: 160%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 38%, transparent), transparent);
  transform: skew(-17deg); pointer-events: none; opacity: .55;
}
.cloud > * { position: relative; z-index: 1; }
.cloud h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
.cloud-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); margin-top: 36px; }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.feature-list li { padding-left: 20px; border-left: 3px solid var(--accent); }
.feature-list b { display: block; font-family: var(--font-display); font-size: 1.125rem; }
.feature-list span { color: var(--muted); }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 18px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 44px; height: 44px;
  background: var(--accent); color: #fff; font: 700 1.25rem var(--font-display); --chamfer: 10px;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.steps b { display: block; font-family: var(--font-display); font-size: 1.125rem; }
.steps span { color: var(--muted); }
.cloud-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.cloud-note { color: var(--muted); font-size: .9875rem; margin: 18px 0 0; max-width: 46rem; }
.h-sub { font-size: 1.25rem; margin-bottom: 1rem; }
@media (max-width: 860px) { .cloud-grid { grid-template-columns: 1fr; } }

/* ---------- Company information ---------- */
.info-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.dl { margin: 0; border-top: 1px solid var(--line); }
.dl > div { display: grid; grid-template-columns: minmax(130px, 220px) 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.dl dt { color: var(--muted); font-weight: 600; }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.dl [hidden] { display: none; }
.legal-links { background: var(--surface); padding: 28px; --chamfer: 22px; }
.legal-links h3 { font-size: 1.375rem; }
.legal-links ul { list-style: none; margin: 0 0 1em; padding: 0; }
.legal-links li { border-bottom: 1px solid var(--line); }
.legal-links li a { display: block; padding: 12px 0; color: var(--text); text-decoration: none; font-weight: 600; }
.legal-links li a:hover { color: var(--accent-soft); }
.legal-links small { color: var(--muted); }
@media (max-width: 860px) { .info-grid { grid-template-columns: 1fr; } .dl > div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- FAQ ---------- */
.faq { max-width: 52rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 48px 22px 0; position: relative;
  font-family: var(--font-display); font-weight: 600; font-size: 1.1875rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 11px; height: 11px;
  border-right: 3px solid var(--accent-soft); border-bottom: 3px solid var(--accent-soft);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .answer { padding: 0 0 24px; color: var(--muted); max-width: 44rem; }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(24px, 5vw, 72px); align-items: start; }
.contact-list { list-style: none; margin: 0 0 24px; padding: 0; border-top: 1px solid var(--line); }
.contact-list li { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.contact-list b { font-family: var(--font-display); font-size: 1.0625rem; }
.contact-list small { color: var(--muted); }
.contact-list a { font-weight: 600; word-break: break-word; }
.form { background: var(--surface); padding: clamp(22px, 4vw, 40px); --chamfer: 26px; display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: .975rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 2px solid var(--line);
  padding: 12px 14px; border-radius: 0; min-height: 48px;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-soft) 35%, transparent); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-note { color: var(--muted); font-size: .9375rem; margin: 0; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } .form-row { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding-top: 64px; margin-top: calc(var(--cut) * .5); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 48px; }
.footer-brand img { height: 30px; width: auto; margin-bottom: 18px; }
.footer-brand p { color: var(--muted); max-width: 22rem; }
.site-footer h3 { font-size: 1.0625rem; margin-bottom: .8em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer ul a { color: var(--muted); text-decoration: none; }
.site-footer ul a:hover { color: var(--text); text-decoration: underline; }
.footer-bottom { border-top: 1px solid var(--line); padding-block: 22px; color: var(--muted); font-size: .9375rem; display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Legal pages ---------- */
.page-hero { padding-block: clamp(48px, 7vw, 88px) clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-style: italic; font-weight: 700; margin-bottom: .3em; }
.page-hero p { color: var(--muted); margin: 0; max-width: 44rem; font-size: 1.125rem; }
.meta { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--muted); font-size: .9875rem; }
.meta b { color: var(--text); }
.legal { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(28px, 6vw, 80px); padding-block: clamp(36px, 6vw, 72px); align-items: start; }
.toc { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto; padding-right: 8px; }
.toc h2 { font-size: 1.0625rem; margin-bottom: .6em; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 7px 0 7px 16px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: .975rem; line-height: 1.35; }
.toc a:hover { color: var(--text); }
.toc a[aria-current="true"] { color: var(--text); border-left-color: var(--accent-soft); }
.doc { max-width: 46rem; }
.doc section { margin-bottom: 44px; scroll-margin-top: 92px; }
.doc h2 { font-size: 1.65rem; padding-top: 6px; }
.doc h3 { font-size: 1.2rem; margin-top: 1.4em; }
.doc p, .doc li { color: color-mix(in srgb, var(--text) 88%, var(--muted)); }
.doc ul, .doc ol { margin: 0 0 1.1em; }
.doc li { margin-bottom: .45em; }
.doc .callout { background: var(--surface); border-left: 4px solid var(--accent); padding: 16px 20px; margin: 0 0 1.2em; }
.doc .callout p { margin: 0; color: var(--text); }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .975rem; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { font-family: var(--font-display); background: var(--surface); }
@media (max-width: 900px) { .legal { grid-template-columns: 1fr; } .toc { position: static; max-height: none; } }

/* ---------- 404 ---------- */
.notfound { min-height: 62vh; display: grid; align-items: center; padding-block: 72px; }
.notfound h1 { font-size: clamp(4rem, 14vw, 9rem); font-style: italic; margin: 0; color: var(--accent-soft); line-height: .95; }

/* ---------- Print (legal pages) ---------- */
@media print {
  .site-header, .site-footer, .toc, .skip-link { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .doc p, .doc li { color: #000; }
  .page-hero { background: none; border: 0; }
}
