/* Angar Digital — site styles
   Fonts: Fraunces & Hanken Grotesk (SIL Open Font License), self-hosted from Google Fonts. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-latin.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --bg: #f7f5f0;
  --surface: #fffefb;
  --text: #191a17;
  --muted: #55554e;
  --line: #e2ded3;
  --accent: #1d5c47;
  --accent-soft: #e3eee8;
  --on-accent: #ffffff;
  --focus: #1d5c47;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 68rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121412;
    --surface: #191c19;
    --text: #ecebe5;
    --muted: #a4a59d;
    --line: #2a2e2a;
    --accent: #85cdac;
    --accent-soft: #1d2a24;
    --on-accent: #0d1a14;
    --focus: #85cdac;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121412;
  --surface: #191c19;
  --text: #ecebe5;
  --muted: #a4a59d;
  --line: #2a2e2a;
  --accent: #85cdac;
  --accent-soft: #1d2a24;
  --on-accent: #0d1a14;
  --focus: #85cdac;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  font-variation-settings: "SOFT" 0, "WONK" 0;
}

p { margin: 0 0 1em; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 2px; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.5rem 0.9rem;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.wordmark:hover { text-decoration: none; }
.wordmark-mark {
  width: 0.62em;
  height: 0.62em;
  border-radius: 3px;
  background: var(--accent);
  transform: translateY(0.02em) rotate(45deg) scale(0.82);
  flex: none;
}
.wordmark-light { font-weight: 400; color: var(--muted); }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2.5vw, 1.75rem);
}
.site-nav ul {
  display: flex;
  gap: clamp(0.75rem, 2.5vw, 1.75rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--text); }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--muted); }
.theme-toggle svg { width: 1.05rem; height: 1.05rem; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

@media (max-width: 40rem) {
  .site-nav ul { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(4rem, 12vw, 8.5rem) clamp(3.5rem, 9vw, 6.5rem);
}
.eyebrow {
  display: inline-block;
  margin: 0 0 1.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero h1 {
  max-width: 16ch;
  font-size: clamp(2.5rem, 7.2vw, 4.75rem);
  font-weight: 450;
  letter-spacing: -0.03em;
  line-height: 1.04;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.lede {
  max-width: 36rem;
  margin: 1.75rem 0 2.25rem;
  font-size: clamp(1.1rem, 2.2vw, 1.25rem);
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.button:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}
.button svg { width: 1rem; height: 1rem; }
@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
  .button:hover { transform: none; }
}

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(3.5rem, 9vw, 6rem);
  border-top: 1px solid var(--line);
}
.section-head {
  display: grid;
  gap: 0.75rem;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
  max-width: 40rem;
}
.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.section h2 {
  font-size: clamp(1.9rem, 4.6vw, 2.75rem);
}
.section-head p:last-child { margin: 0; color: var(--muted); }

/* What we do */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.service {
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  background: var(--surface);
}
.service-num {
  display: block;
  margin-bottom: 2.5rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--accent);
}
.service h3 {
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
}
.service p {
  margin: 0;
  color: var(--muted);
}

/* Apps */
.app-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: clamp(1rem, 3vw, 1.75rem);
  max-width: 40rem;
  padding: clamp(1.25rem, 3.5vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.app-icon {
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 22%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 500;
}
.app-card h3 {
  font-size: 1.6rem;
  margin-bottom: 0.25rem;
}
.app-card p { margin: 0; color: var(--muted); }
.app-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
}
.tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}
.tag-accent {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent);
}
@media (max-width: 26rem) {
  .app-card { grid-template-columns: 1fr; }
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact-email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4.2vw, 2.1rem);
  font-weight: 450;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.contact-note { color: var(--muted); max-width: 30rem; }
.company-details {
  margin: 0;
  display: grid;
  gap: 1.25rem;
}
.company-details div { display: grid; gap: 0.2rem; }
.company-details dt {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.company-details dd { margin: 0; }
.company-details address { font-style: normal; }

/* ---------- Legal pages ---------- */
.legal {
  max-width: 44rem;
  padding-block: clamp(3rem, 9vw, 5.5rem) clamp(3.5rem, 9vw, 6rem);
}
.legal h1 {
  font-size: clamp(2.2rem, 6vw, 3.25rem);
  letter-spacing: -0.025em;
}
.legal .updated {
  margin: 1rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.legal h2 {
  font-size: 1.45rem;
  margin: 2.6rem 0 0.8rem;
}
.legal h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0;
  margin: 1.6rem 0 0.5rem;
}
.legal ul { padding-left: 1.2rem; margin: 0 0 1em; }
.legal li { margin-bottom: 0.4rem; }
.legal li::marker { color: var(--accent); }
.legal address { font-style: normal; }
.legal .summary {
  padding: 1.25rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
}
.legal .summary p:last-child,
.legal .summary ul:last-child { margin-bottom: 0; }

/* ---------- 404 ---------- */
.not-found {
  padding-block: clamp(5rem, 16vw, 10rem);
}
.not-found h1 { font-size: clamp(2.4rem, 7vw, 4rem); margin-bottom: 1rem; }
.not-found p { color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem 2.5rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.footer-inner p { margin: 0; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
