/* ============================================================
   MaRI — madeinri.id Design System
   Made in Republic of Indonesia
   Dieter Rams Philosophy: As little design as possible.
   Typography: DM Serif Display + DM Mono
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

/* ─── Tokens ─────────────────────────────────────────── */
:root {
  --bg:           #F5F3EF;
  --bg-secondary: #EEEBE4;
  --surface:      #FFFFFF;
  --border:       #D9D4C9;
  --text:         #1A1916;
  --text-muted:   #6B6760;
  --text-faint:   #A8A49D;
  --accent:       #C4621A;
  --accent-light: #F0E6DC;
  --accent-dark:  #8B4210;

  --font-serif:   'DM Serif Display', Georgia, serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;
  --font-sans:    'DM Sans', system-ui, sans-serif;

  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  2rem;
  --space-xl:  4rem;
  --space-2xl: 8rem;

  --radius:    2px;
  --transition: 200ms cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-slow: 400ms cubic-bezier(0.25, 0.1, 0.25, 1);

  --max-width: 1200px;
  --col-width: 680px;
}

[data-theme="dark"] {
  --bg:           #141210;
  --bg-secondary: #1C1A17;
  --surface:      #211F1B;
  --border:       #302D28;
  --text:         #F0EDE8;
  --text-muted:   #8C897F;
  --text-faint:   #504D47;
  --accent:       #D4743A;
  --accent-light: #2A1F15;
  --accent-dark:  #E8A070;
}

/* ─── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition-slow), color var(--transition-slow);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ─── Typography ─────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.1rem; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 60ch;
}

/* ─── Layout ─────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-lg);
}

section { padding: var(--space-2xl) 0; }

/* ─── Navigation ─────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-slow);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a.active {
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Theme toggle */
.theme-toggle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  transition: color var(--transition), border-color var(--transition);
}

.theme-toggle:hover { color: var(--text); border-color: var(--text-muted); }

.icon-sun, .icon-moon { display: none; width: 14px; height: 14px; }
:root:not([data-theme="dark"]) .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: block; }

/* Mobile menu */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 24px;
  padding: 4px 0;
}
.nav-hamburger span {
  width: 100%;
  height: 1px;
  background: var(--text);
  transition: var(--transition);
}

/* Page offset for fixed nav */
main { padding-top: 56px; }

/* ─── Dividers ───────────────────────────────────────── */
.rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-xl) 0;
}

/* ─── Labels / Tags ──────────────────────────────────── */
.label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-lg);
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius);
}

/* ─── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  transition: var(--transition);
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover { opacity: 0.8; }

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-outline:hover { border-color: var(--text-muted); color: var(--text); }

/* ─── Cards ──────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}
.card:hover { border-color: var(--text-muted); }

.card-img {
  aspect-ratio: 4/3;
  background: var(--bg-secondary);
  overflow: hidden;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.25, 0.1, 0.25, 1);
}
.card:hover .card-img img { transform: scale(1.03); }

.card-body { padding: var(--space-lg); }

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

/* ─── Hero ───────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--border);
}

/* ─── Footer ─────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) 0;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--text-muted); }

/* ─── Animations ─────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.animate-fade-up { animation: fadeUp 0.7s cubic-bezier(0.25, 0.1, 0.25, 1) both; }
.animate-fade-in { animation: fadeIn 0.7s ease both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.6s; }

/* ─── Horizontal rule with label ─────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section-label span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}

/* ─── Accent line ────────────────────────────────────── */
.accent-line {
  width: 40px;
  height: 2px;
  background: var(--accent);
  margin-bottom: var(--space-lg);
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .grid-12 { grid-template-columns: 1fr; }

  .container { padding: 0 var(--space-md); }
  section { padding: var(--space-xl) 0; }
  .hero { padding-bottom: var(--space-xl); }

  .footer-inner { flex-direction: column; align-items: flex-start; }
}
