/* CyRaSri website — Paper & Ink. Light and dark share one set of colour tokens. */
:root {
  --paper: #F6F2EA;
  --paper-2: #EFE9DD;
  --card: #FBF8F2;
  --ink: #1C1B19;
  --ink-2: #4A463F;
  --muted: #6B655B;
  --line: #DDD5C6;
  --accent: #8A4B22;
  --accent-ink: #FFFFFF;
  --dark-band: #1C1B19;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #16150F; --paper-2: #1E1C16; --card: #22201A;
    --ink: #F1ECE2; --ink-2: #C9C1B2; --muted: #A39B8C; --line: #37332A;
    --accent: #D9935F; --accent-ink: #16150F; --dark-band: #0E0D09;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #16150F; --paper-2: #1E1C16; --card: #22201A;
  --ink: #F1ECE2; --ink-2: #C9C1B2; --muted: #A39B8C; --line: #37332A;
  --accent: #D9935F; --accent-ink: #16150F; --dark-band: #0E0D09;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: clamp(16px, 0.55vw + 10px, 19px); line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--accent); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
/* The page uses the width of the screen: side margins grow with the window, and only very large screens stop widening. */
.wrap { width: 100%; max-width: 1760px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 104px); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 16px; }

/* All explanations use the same Fraunces as the headings (the Paper & Ink look); only small labels, buttons and the menu stay in the plain sans. */
p, li, .contact-list a, .contact-list span { font-family: var(--serif); font-weight: 400; }
p { font-size: 1.06em; line-height: 1.65; }
.eyebrow, .prod-kicker { font-family: var(--sans); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px; border-radius: 999px; font-weight: 600; font-size: 16px; text-decoration: none; transition: transform .2s ease, background .2s ease, color .2s ease; }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--accent); color: var(--accent-ink); transform: translateY(-1px); }
.btn-line { border: 1.5px solid var(--ink); color: var(--ink); min-height: 44px; padding: 0 20px; }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-wide { width: 100%; }
.link-arrow { font-weight: 600; text-decoration: none; color: var(--ink); display: inline-flex; gap: 6px; align-items: center; min-height: 44px; }
.link-arrow span { transition: transform .2s ease; }
.link-arrow:hover { color: var(--accent); }
.link-arrow:hover span { transform: translateX(4px); }
.icon-btn { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { border-color: var(--ink); }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .i-sun { display: none; } :root:not([data-theme="light"]) .i-moon { display: block; } }

/* Header */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .3s ease; }
.top.scrolled { border-bottom-color: var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 92px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 38px; line-height: 1; letter-spacing: -0.01em; }
.brand-sm .brand-name { font-size: 30px; }
.nav { display: flex; align-items: center; gap: 30px; font-size: 15px; }
.nav a:not(.btn) { color: var(--ink-2); text-decoration: none; }
.nav a:not(.btn):hover { color: var(--ink); }
.top-tools { display: flex; gap: 8px; }
.menu-btn { display: none; }

/* The logo is the name itself, in Fraunces: Cy · Ra · Sri, the middle part in copper.
   When the page opens the letters rise into place one by one, out of a soft blur. */
.brand-name .ra, .ra { color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .top .bl { display: inline-block; animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
  .top .bl:nth-child(1) { animation-delay: .10s; } .top .bl:nth-child(2) { animation-delay: .18s; }
  .top .bl:nth-child(3) { animation-delay: .26s; } .top .bl:nth-child(4) { animation-delay: .34s; }
  .top .bl:nth-child(5) { animation-delay: .42s; } .top .bl:nth-child(6) { animation-delay: .50s; }
  .top .bl:nth-child(7) { animation-delay: .58s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* Hero */
.hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; align-items: end; padding-top: 96px; padding-bottom: 96px; }
.hero-text { grid-column: span 8; display: flex; flex-direction: column; gap: 28px; }
.hero h1 { font-size: clamp(42px, 5.6vw, 108px); line-height: 1.03; letter-spacing: -0.025em; }
.hero h1 em { color: var(--accent); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.hero-side { grid-column: span 4; font-size: clamp(17px, 1.15vw, 21px); line-height: 1.7; color: var(--ink-2); padding-bottom: 10px; }
.eyebrow { font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); font-weight: 500; }

/* Sections */
.band { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 96px 0; }
.products, .why { padding-top: 96px; padding-bottom: 96px; }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 48px; max-width: 1100px; }
.section-head h2 { font-size: clamp(32px, 3.4vw, 64px); line-height: 1.1; }

.build-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.build-grid li { padding: 32px 32px 36px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.build-grid li:not(:nth-child(3n+1)) { padding-left: 32px; border-left: 1px solid var(--line); }
.build-grid .num { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 18px; }
.build-grid h3 { font-size: 26px; }
.build-grid p { color: var(--ink-2); font-size: 16px; }

.prod-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.prod { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 36px; display: flex; flex-direction: column; gap: 16px; transition: transform .3s ease, box-shadow .3s ease; }
.prod:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(28, 27, 25, .35); }
.prod-logo { align-self: flex-start; display: inline-flex; align-items: center; gap: 14px; padding: 14px 22px 14px 16px; border-radius: 16px; }
.prod-dok { background: #13233F; }
.prod-aig { background: #2A2320; }
.prod-word { font-family: 'Josefin Sans', var(--sans); font-weight: 600; font-size: 19px; letter-spacing: 0.3em; color: #FFFFFF; padding-top: 3px; }
.prod-kicker { font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-top: 8px; }
.prod h3 { font-size: 30px; line-height: 1.15; }
.prod > p { color: var(--ink-2); }
.ticks { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 16px; }
.ticks li { display: flex; gap: 10px; align-items: baseline; }
.ticks li::before { content: ""; flex: none; width: 14px; height: 8px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg) translateY(-3px); }
.prod-actions { margin-top: auto; padding-top: 14px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: s; }
.steps li { display: flex; flex-direction: column; gap: 10px; position: relative; }
.step-n { width: 48px; height: 48px; border-radius: 999px; border: 1.5px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 22px; margin-bottom: 6px; background: var(--paper-2); position: relative; z-index: 1; }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 24px; left: 56px; right: -20px; border-top: 1px dashed var(--line); }
.steps h3 { font-size: 24px; }
.steps p { color: var(--ink-2); font-size: 16px; }

.why-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.why-grid > div { padding: 32px 40px 36px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.why-grid > div:nth-child(even) { padding-left: 40px; border-left: 1px solid var(--line); }
.why-grid h3 { font-size: 26px; }
.why-grid p { color: var(--ink-2); }

.contact { background: var(--dark-band); color: #F1ECE2; padding: 96px 0; }
.contact .eyebrow { color: #A39B8C; }
.contact-inner { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; row-gap: 40px; align-items: center; }
.contact-inner > div:first-child { grid-column: span 6; display: flex; flex-direction: column; gap: 16px; }
.contact h2 { font-size: clamp(36px, 4vw, 72px); line-height: 1.05; }
.contact-lead { color: #C9C1B2; font-size: 18px; max-width: 460px; }
.contact-card { grid-column: 8 / span 5; background: #2A2722; border: 1px solid #3B372F; border-radius: 22px; padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.contact-partner { font-family: var(--serif); font-size: 26px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.contact-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid #3B372F; font-size: 16px; }
.contact-list span { color: #A39B8C; }
.contact-list a { color: #F1ECE2; text-decoration: none; }
.contact-list a:hover { color: #D9935F; }
.contact-note { color: #C9C1B2; font-size: 16px; }
.contact-direct { font-size: 15px; color: #A39B8C; text-align: center; }
.contact-direct a { color: #F1ECE2; }
.contact-direct a:hover { color: #D9935F; }
.contact .btn-solid { background: #F1ECE2; color: #1C1B19; }
.contact .btn-solid:hover { background: #D9935F; color: #16150F; }

.foot { border-top: 1px solid var(--line); padding: 36px 0; font-size: 15px; color: var(--muted); }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-links a { color: var(--ink-2); text-decoration: none; }
.foot-links a:hover { color: var(--accent); }

/* Privacy notice page */
.legal { max-width: 860px; padding-top: 72px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 16px; }
.legal h1 { font-size: clamp(34px, 4vw, 56px); line-height: 1.1; }
.legal h2 { font-size: clamp(24px, 2vw, 30px); margin-top: 24px; }
.legal p, .legal li { color: var(--ink-2); }
.legal ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal-date { color: var(--muted) !important; font-size: 15px; }

/* Sections fade up gently as they come into view (only when scripts run and motion is welcome). */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); }
  .js .reveal.in { opacity: 1; transform: none; }
}

/* Tablet */
@media (max-width: 980px) {
  .hero { padding-top: 64px; padding-bottom: 72px; row-gap: 28px; }
  .hero-text, .hero-side { grid-column: 1 / -1; }
  .build-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .build-grid li, .build-grid li:not(:nth-child(3n+1)) { padding: 28px 28px 32px 0; border-left: 0; }
  .build-grid li:nth-child(even) { padding-left: 28px; border-left: 1px solid var(--line); }
  .prod-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .steps li::after { display: none; }
  .contact-inner > div:first-child, .contact-card { grid-column: 1 / -1; }
}

/* Phone */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .top-inner { min-height: 68px; }
  .brand-name { font-size: 32px; }
  .menu-btn { display: inline-flex; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 16px 20px; display: none; }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav .btn { margin-top: 16px; }
  .band, .products, .why, .contact { padding-top: 64px; padding-bottom: 64px; }
  .hero { padding-top: 48px; padding-bottom: 64px; }
  .section-head { margin-bottom: 32px; }
  .build-grid, .why-grid, .steps { grid-template-columns: 1fr; }
  .build-grid li, .build-grid li:nth-child(even), .why-grid > div, .why-grid > div:nth-child(even) { padding: 24px 0; border-left: 0; }
  .prod { padding: 26px 22px; }
  .prod h3 { font-size: 26px; }
  .contact-card { padding: 24px 20px; }
  .contact-list li { flex-direction: column; gap: 2px; }
  .foot-inner { flex-direction: column; align-items: flex-start; }
}
