/* rizs.app root pages (home, privacy, 404). Same theme as irizarsolutions.com; app folders such as calc/ keep their own stylesheet. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

/* Palette tokens, shared with irizarsolutions.com and public/calc/assets/style.css. */
:root {
  --bg: #1c1f22;
  --surface: #24282c;
  --line: #33383d;
  --ink: #f2f4f5;
  --muted: #a3abb2;
  --faint: #3b4247;
  --accent: #2ec4b6;
  --accent-ink: #06201d;

  color-scheme: dark;
  --font: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --edge: clamp(16px, 3.75vw, 60px);
  --inset: clamp(16px, 1.75vw, 28px);
  --header-height: 84px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--line), var(--line)),
    linear-gradient(var(--line), var(--line)),
    linear-gradient(var(--line), var(--line));
  background-size: 1px 100%;
  background-position: 25% 0, 50% 0, 75% 0;
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.22em;
}
a:hover { color: var(--accent); }

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

h1, h2, h3, p { margin: 0; }
p { text-wrap: pretty; }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--accent-ink); }

/* Four columns that line up with the background lines at 25%, 50% and 75%. */
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.grid > * { padding-inline: var(--inset); }

/* Header */

.header-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  min-height: var(--header-height);
  margin-inline: var(--edge);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: start;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand-mark { width: 34px; height: 34px; flex: none; }

.site-nav { grid-column: 2 / 4; justify-self: center; }
.site-nav ul {
  display: flex;
  gap: clamp(24px, 3.5vw, 56px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  font-size: 1.05rem;
  font-stretch: 112%;
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  grid-column: 4;
  justify-self: end;
}
.lang-switch {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.95rem;
  text-decoration: none;
}
.lang-switch:hover { border-color: var(--accent); }

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 30px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.cta:hover { color: var(--accent-ink); filter: brightness(1.08); }

/* Hero */

.hero {
  position: relative;
  display: grid;
  align-content: center;
  min-height: min(calc(100svh - var(--header-height)), 980px);
  padding-block: clamp(72px, 10vw, 140px) clamp(150px, 19vw, 300px);
  overflow: hidden;
}
.hero-copy {
  margin-left: 25%;
  padding-inline: var(--inset);
}
.hero h1 {
  font-size: clamp(2.5rem, 6.6vw, 7.5rem);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 0.94;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
.hero-line { display: block; }
.hero-line-accent { color: var(--accent); }

.hero-sub {
  display: flex;
  align-items: center;
  gap: 12px;
  /* Puts the text start on the 50% line, with the arrow just before it. */
  margin: 0.9em 0 0 calc((100% + 2 * var(--inset)) / 3 - var(--inset) - 76px);
  color: var(--muted);
  font-size: clamp(1.05rem, 1.9vw, 1.9rem);
  font-weight: 300;
  line-height: 1.2;
  text-transform: uppercase;
}
.hero-arrow {
  width: 64px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-outline {
  position: absolute;
  left: -0.04em;
  bottom: -0.2em;
  color: transparent;
  -webkit-text-stroke: max(1px, 0.11vw) var(--faint);
  font-size: 22vw;
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}

/* Sections */

.section {
  padding-block: clamp(64px, 9vw, 128px);
  border-top: 1px solid var(--line);
}
.section-title {
  grid-column: 2 / 5;
  margin-bottom: clamp(32px, 4vw, 56px);
  font-size: clamp(2rem, 4.6vw, 4.75rem);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 0.95;
  text-transform: uppercase;
}
.section-lede {
  grid-column: 2 / 5;
  max-width: 44em;
  color: var(--muted);
  font-size: 1.15rem;
}

.intro-text {
  grid-column: 2 / 5;
  max-width: 28em;
  font-size: clamp(1.4rem, 2.4vw, 2.3rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h3 {
  margin-bottom: 0.6em;
  font-size: 1.15rem;
  font-weight: 700;
  font-stretch: 112%;
  line-height: 1.25;
}

.app {
  grid-column: 2 / 4;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  margin-inline: var(--inset);
  padding: 28px;
  background: var(--surface);
}
.app-icon { width: 88px; height: 88px; }
.app-body h3 { font-size: 1.5rem; margin-bottom: 0.3em; }
.app-body p { color: var(--muted); }
.app-body p + p { margin-top: 0.8em; }
.status {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.9rem;
}
.app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.principles {
  grid-column: 1 / 5;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-inline: 0;
}
.principles article { padding-inline: var(--inset); }
.principles article:first-child { grid-column: 2; }
.principles article::before {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  margin-bottom: 22px;
  background: var(--accent);
}
.principles p { color: var(--muted); }

/* Privacy and other documents */

.page { padding-block: clamp(64px, 9vw, 128px); }
.page-meta { grid-column: 2 / 5; margin: 12px 0 40px; color: var(--muted); }
.doc { grid-column: 2 / 5; max-width: 44em; }
.doc h2 {
  margin: 2em 0 0.6em;
  font-size: 1.5rem;
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.2;
}
.doc p + p { margin-top: 1em; }
.doc ul { margin: 0.8em 0 0; padding-left: 1.25em; }
.doc li { margin-bottom: 0.4em; }
.doc p, .doc li { color: var(--muted); }
.doc a { color: var(--ink); }

.summary-box { padding: 24px 28px; background: var(--surface); }
.summary-box h2 { margin-top: 0; font-size: 1.15rem; }

/* Footer */

.site-footer {
  padding-block: 32px 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .footer-text { grid-column: 2 / 4; }
.site-footer ul {
  grid-column: 4 / 5;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 0;
  list-style: none;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* 404 */

.not-found { padding-block: clamp(80px, 12vw, 180px); }
.not-found .section-title { margin-bottom: 24px; }
.not-found .section-lede + .section-lede { margin-top: 12px; }

/* Responsive */

@media (max-width: 1100px) {
  .app { grid-column: 2 / 5; }
  .principles { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; }
  .principles article:first-child { grid-column: auto; }
  .principles article { padding-left: var(--edge); }
  .site-footer .footer-text { grid-column: 2 / 5; }
  .site-footer ul { grid-column: 2 / 5; margin-top: 12px; }
}

@media (max-width: 860px) {
  .hero-copy { margin-left: 0; padding-inline: var(--edge); }
  .hero-sub { margin-left: 0; }
  .grid > * { grid-column: 1 / -1; padding-inline: var(--edge); }
  .grid > .principles { padding-inline: 0; }
  .grid > .app { margin-inline: var(--edge); }
  .site-nav { display: none; }
  .header-actions { grid-column: 2 / 5; }
  .site-footer .footer-text, .site-footer ul { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  :root { --header-height: 68px; }
  body { background-image: none; }
  .hero { min-height: auto; }
  .hero h1 { font-size: 9vw; }
  .hero-arrow { width: 44px; }
  .principles { grid-template-columns: 1fr; }
  .principles article { padding-inline: var(--edge); }
  .app { grid-template-columns: 1fr; padding: 20px; }
  .brand { font-size: 1rem; }
  .cta { padding-inline: 18px; letter-spacing: 0.12em; }
}

@media (max-width: 420px) {
  .lang-switch { padding: 0 12px; }
  .cta { display: none; }
}
