/* ashokva.net — base styles
   Ma/Lagom restraint · Sanzo Wada colour · Apple HIG clarity */

:root {
  --salt-sand: #F6EFE1;
  --desert-night: #22314A;
  --gold-deep: #96650B;
  --gold-light: #F3C77A;
  --glow: rgba(150, 101, 11, 0.10);

  --bg: var(--salt-sand);
  --fg: var(--desert-night);
  --accent: var(--gold-deep);
  --nav-bg: var(--salt-sand);
  --nav-border: rgba(34, 49, 74, 0.14);
  --muted: rgba(34, 49, 74, 0.72);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Atkinson Hyperlegible', system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--desert-night);
    --fg: var(--salt-sand);
    --accent: var(--gold-light);
    --glow: rgba(243, 199, 122, 0.14);
    --nav-bg: var(--desert-night);
    --nav-border: rgba(246, 239, 225, 0.16);
    --muted: rgba(246, 239, 225, 0.72);
  }
}

@media (prefers-contrast: more) {
  :root {
    --bg: #FFFFFF;
    --fg: #000000;
    --accent: #6B4600;
    --glow: transparent;
    --nav-bg: #FFFFFF;
    --nav-border: #000000;
    --muted: #000000;
  }
}

@media (prefers-color-scheme: dark) and (prefers-contrast: more) {
  :root {
    --bg: #000000;
    --fg: #FFFFFF;
    --accent: #FFD98A;
    --glow: transparent;
    --nav-bg: #000000;
    --nav-border: #FFFFFF;
    --muted: #FFFFFF;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  transition: background 0.2s ease, color 0.2s ease;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--bg);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  border-radius: 0 0 0.375rem 0;
  font-family: var(--font-body);
  font-weight: 700;
}
.skip-link:focus {
  left: 0;
}

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

.site-header {
  display: flex;
  justify-content: flex-start;
  padding: 1.75rem 0 0.5rem 1.5rem;
}

.site-header img {
  height: 26px;
  width: auto;
}

.hero {
  position: relative;
  max-width: 620px;
  padding: 3rem 1.5rem 4.5rem;
  margin: 0 0 0 1.5rem;
  min-height: 58vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero::before {
  content: "";
  position: absolute;
  top: -10%;
  left: -20%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-lines {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-variation-settings: 'SOFT' 40, 'WONK' 1;
  font-weight: 480;
  margin: 0;
  letter-spacing: -0.01em;
}

.hero-lines span {
  display: block;
}

.hero-lines .line-1 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: var(--muted);
}

.hero-lines .line-2 {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  margin-top: 0.15em;
}

.hero-lines .line-3 {
  font-size: clamp(2.5rem, 8vw, 4.25rem);
  margin-top: 0.15em;
  margin-left: 0.4em;
  color: var(--accent);
  font-style: italic;
  font-variation-settings: 'SOFT' 65, 'WONK' 1;
}

.hero-intro {
  margin: 2rem 0 0;
  max-width: 34ch;
  color: var(--muted);
  font-size: 1.0625rem;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-lines span, .hero-intro {
    opacity: 0;
    transform: translateY(8px);
    animation: rise 0.7s ease forwards;
  }
  .hero-lines .line-1 { animation-delay: 0.05s; }
  .hero-lines .line-2 { animation-delay: 0.2s; }
  .hero-lines .line-3 { animation-delay: 0.35s; }
  .hero-intro { animation-delay: 0.55s; }
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

main {
  padding-bottom: 5.5rem;
}

.site-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: var(--nav-bg);
  border-top: 1px solid var(--nav-border);
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 50;
}

.site-nav a,
.site-nav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 44px;
  padding: 0.6rem 0.25rem 0.5rem;
  color: var(--fg);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  background: none;
  border: none;
  cursor: pointer;
}

.site-nav svg {
  width: 22px;
  height: 22px;
}

.site-nav [aria-current="page"] {
  color: var(--accent);
}

.more-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  border-top: 1px solid var(--nav-border);
  border-radius: 1rem 1rem 0 0;
  padding: 1rem 1.5rem calc(1.5rem + env(safe-area-inset-bottom, 0));
  z-index: 60;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.12);
}

.more-sheet[hidden] { display: none; }

.more-sheet ul {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.more-sheet li + li {
  border-top: 1px solid var(--nav-border);
}

.more-sheet a {
  display: block;
  padding: 0.9rem 0.25rem;
  color: var(--fg);
  text-decoration: none;
  font-size: 1rem;
}

.more-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 55;
}

.more-sheet-backdrop[hidden],
.more-sheet[hidden] { display: none; }

@media (min-width: 900px) {
  .site-header { padding-left: 8vw; }
  .hero { margin-left: 8vw; }
}
