/* =========================================================
   Makan Diary — Editorial Dark Aesthetic
   A field-journal magazine, rendered as a website.
   ========================================================= */

:root {
  /* Dark editorial palette */
  --ink:         #0a0a0a;
  --ink-soft:    #111111;
  --paper:       #f5e6c8;    /* warm cream, sparingly */
  --paper-dim:   #d9c8a8;
  --rule:        #2a2a2a;
  --rule-strong: #3a3a3a;
  --muted:       #8a8378;
  --dim:         #525049;
  --accent:      #f97316;
  --accent-deep: #c2410c;
  --red:         #e63946;

  /* Type */
  --display: 'Playfair Display', 'Times New Roman', serif;
  --body:    'Instrument Sans', system-ui, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, monospace;

  /* Spacing rhythm */
  --gutter: clamp(20px, 4vw, 56px);
  --maxw:   1280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: #f0ece4;
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.55;
  font-size: 16px;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Subtle film-grain — adds warmth, like newsprint. */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* =========================================================
   Layout primitives
   ========================================================= */

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease;
}

a:hover { color: var(--accent); }

::selection { background: var(--accent); color: var(--ink); }

/* =========================================================
   Masthead (top bar — appears on every page)
   ========================================================= */

.masthead {
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.masthead .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.masthead-meta { display: flex; gap: 18px; flex-wrap: wrap; }
.masthead-meta span { color: var(--dim); }
.masthead-meta strong { color: var(--paper-dim); font-weight: 500; }

.masthead-nav { display: flex; gap: 20px; }
.masthead-nav a {
  color: var(--paper-dim);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.masthead-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* =========================================================
   Hero — magazine cover
   ========================================================= */

.hero {
  padding: clamp(60px, 9vw, 120px) 0 clamp(80px, 11vw, 160px);
  position: relative;
  overflow: hidden;
}

.hero::after {
  /* Subtle warm vignette in the top-right corner */
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.08), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-issue {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-issue::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
  max-width: 200px;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(48px, 7.5vw, 108px);
  line-height: 0.94;
  letter-spacing: -0.025em;
  color: #f8f3e8;
  margin-bottom: 40px;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 700;
}

.hero-lede {
  font-family: var(--body);
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.6;
  color: var(--paper-dim);
  max-width: 460px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--ink);
  border: none;
  font-weight: 600;
  transition: transform 0.18s ease, background 0.18s ease;
}

.cta:hover {
  background: #fb923c;
  color: var(--ink);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--accent-deep);
}

.cta-ghost {
  background: transparent;
  color: var(--paper-dim);
  border: 1px solid var(--rule-strong);
}

.cta-ghost:hover {
  background: var(--ink-soft);
  color: var(--paper);
  border-color: var(--paper-dim);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--rule);
}

/* Diary-entry mockup card — the hero visual */

.diary-card {
  background: linear-gradient(180deg, #1a1816 0%, #141210 100%);
  border: 1px solid var(--rule);
  padding: 32px 28px;
  position: relative;
  transform: rotate(1.5deg);
  box-shadow:
    0 30px 60px -20px rgba(0,0,0,0.6),
    0 0 0 1px rgba(249, 115, 22, 0.05);
  font-family: var(--body);
  max-width: 380px;
  margin-left: auto;
}

.diary-card::before {
  /* Top-edge tape effect */
  content: '';
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%) rotate(-1deg);
  width: 80px; height: 20px;
  background: rgba(249, 115, 22, 0.15);
  border: 1px dashed rgba(249, 115, 22, 0.3);
}

.diary-date {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 12px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
}

.diary-place {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  color: #f5e6c8;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.diary-addr {
  font-size: 12px;
  color: var(--dim);
  margin-top: 2px;
  margin-bottom: 22px;
}

.diary-dish {
  margin-bottom: 14px;
}

.diary-dish-name {
  font-size: 14px;
  color: #e8e2d4;
  margin-bottom: 4px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.diary-dish-name::before {
  content: '·';
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
}

.diary-rating {
  display: grid;
  grid-template-columns: 1fr auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  padding-left: 14px;
  margin-top: 2px;
}

.diary-rating strong {
  font-weight: 700;
  color: #f5e6c8;
  font-variant-numeric: tabular-nums;
}

.diary-overall {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.diary-overall strong {
  font-family: var(--display);
  font-size: 32px;
  font-style: italic;
  color: var(--accent);
  letter-spacing: 0;
}

.diary-quote {
  font-style: italic;
  color: var(--paper-dim);
  font-size: 13px;
  margin-top: 16px;
  padding-left: 14px;
  border-left: 2px solid var(--accent);
  line-height: 1.5;
}

/* =========================================================
   Section header (used across the page)
   ========================================================= */

.section {
  padding: clamp(70px, 9vw, 120px) 0;
  position: relative;
}

.section + .section {
  border-top: 1px solid var(--rule);
}

.section-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-eyebrow::before {
  content: '';
  width: 30px; height: 1px;
  background: var(--accent);
}

.section-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(36px, 4.5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #f5e6c8;
  max-width: 800px;
  margin-bottom: 24px;
}

.section-title em {
  font-style: italic;
  color: var(--accent);
}

.section-lede {
  font-size: clamp(16px, 1.3vw, 18px);
  color: var(--muted);
  max-width: 620px;
  line-height: 1.6;
  margin-bottom: 56px;
}

/* =========================================================
   Features — numbered columns, magazine-style
   ========================================================= */

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.feature {
  background: var(--ink);
  padding: 48px 36px;
  position: relative;
  transition: background 0.3s ease;
}

.feature:hover { background: var(--ink-soft); }

.feature-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 24px;
}

.feature h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.015em;
  color: #f5e6c8;
  margin-bottom: 14px;
  line-height: 1.15;
}

.feature p {
  color: var(--muted);
  line-height: 1.65;
  font-size: 15px;
  max-width: 380px;
}

/* =========================================================
   Pull quote — big editorial moment
   ========================================================= */

.pullquote {
  padding: clamp(80px, 12vw, 160px) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  text-align: center;
  position: relative;
}

.pullquote::before {
  content: '\201C';
  position: absolute;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--display);
  font-size: 160px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.18;
  font-style: italic;
}

.pullquote p {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: #f5e6c8;
  max-width: 880px;
  margin: 0 auto;
}

.pullquote cite {
  font-style: normal;
  display: block;
  margin-top: 36px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* =========================================================
   Colophon footer
   ========================================================= */

footer.colophon {
  border-top: 1px solid var(--rule-strong);
  padding: clamp(56px, 7vw, 80px) 0 32px;
  font-family: var(--body);
  background: #060606;
}

.colophon-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}

.colophon h4 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  font-weight: 600;
}

.colophon-brand h2 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #f5e6c8;
  margin-bottom: 8px;
}

.colophon-brand p {
  font-size: 14px;
  color: var(--muted);
  max-width: 380px;
  line-height: 1.6;
}

.colophon ul { list-style: none; }
.colophon li {
  margin-bottom: 10px;
  font-size: 14px;
}
.colophon li a { color: var(--paper-dim); }
.colophon li a:hover { color: var(--accent); }

.colophon-bottom {
  border-top: 1px solid var(--rule);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.colophon-bottom .ornaments { color: var(--accent); }

/* =========================================================
   Article pages (support / privacy / terms)
   ========================================================= */

.article {
  padding: clamp(60px, 8vw, 100px) 0;
  max-width: 800px;
  margin: 0 auto;
}

.article-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.article h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: #f5e6c8;
  margin-bottom: 20px;
}

.article .article-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 28px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--rule);
}

.article h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: -0.015em;
  color: #f5e6c8;
  margin-top: 48px;
  margin-bottom: 16px;
}

.article h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  color: #f5e6c8;
  margin-top: 32px;
  margin-bottom: 10px;
}

.article p, .article li {
  font-size: 16px;
  line-height: 1.72;
  color: #d4cfc4;
  margin-bottom: 18px;
}

.article ul, .article ol {
  padding-left: 24px;
  margin-bottom: 18px;
}

.article li { margin-bottom: 8px; }
.article li::marker { color: var(--accent); }

.article a {
  color: var(--accent);
  border-bottom: 1px solid rgba(249, 115, 22, 0.4);
}
.article a:hover { border-bottom-color: var(--accent); }

.article strong { color: #f5e6c8; font-weight: 600; }

/* Highlighted callout box (used in support page) */

.callout {
  border: 1px solid var(--rule-strong);
  padding: 32px;
  margin: 36px 0;
  background: var(--ink-soft);
  position: relative;
}

.callout-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.callout h3 {
  font-family: var(--display);
  font-size: 24px;
  color: #f5e6c8;
  margin: 0 0 12px 0;
}

.callout p { margin-bottom: 16px; color: var(--muted); }

.whatsapp-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: #25d366;
  color: #052e16 !important;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  border: none !important;
  transition: transform 0.18s ease, background 0.18s ease;
}

.whatsapp-cta:hover {
  background: #20c25c;
  color: #052e16 !important;
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 #128c3c;
  border: none !important;
}

/* FAQ */
details {
  border-bottom: 1px solid var(--rule);
  padding: 20px 0;
}

details summary {
  cursor: pointer;
  font-family: var(--display);
  font-size: 18px;
  color: #f5e6c8;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

details summary::after {
  content: '+';
  color: var(--accent);
  font-family: var(--mono);
  font-size: 22px;
  transition: transform 0.2s ease;
}

details[open] summary::after { content: '−'; }

details p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 880px) {
  .hero .container { grid-template-columns: 1fr; }
  .diary-card { transform: rotate(0deg); margin: 0 auto; }
  .features { grid-template-columns: 1fr; }
  .colophon-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .colophon-bottom { font-size: 10px; }
}

@media (max-width: 520px) {
  .colophon-grid { grid-template-columns: 1fr; }
  .masthead { font-size: 10px; }
  .masthead-meta { gap: 12px; }
  .hero-issue::after { display: none; }
}

/* =========================================================
   Entrance animations — restrained, one-shot reveal
   ========================================================= */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  animation: fadeUp 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.fade-in-1 { animation-delay: 0.1s; }
.fade-in-2 { animation-delay: 0.25s; }
.fade-in-3 { animation-delay: 0.4s; }
.fade-in-4 { animation-delay: 0.55s; }

/* =========================================================
   Floating WhatsApp button
   ========================================================= */

.wa-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px -4px rgba(37, 211, 102, 0.5),
              0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.2s ease;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.12);
}

.wa-float:hover {
  transform: translateY(-3px) scale(1.04);
  color: inherit;
  box-shadow: 0 16px 36px -4px rgba(37, 211, 102, 0.7),
              0 6px 12px rgba(0, 0, 0, 0.4);
}

.wa-float:active { transform: translateY(-1px) scale(1.01); }

.wa-float svg {
  width: 30px;
  height: 30px;
  fill: #ffffff;
}

/* Soft pulse ring to draw the eye on first paint */
.wa-float::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid #25d366;
  opacity: 0.6;
  animation: wa-pulse 2.4s ease-out infinite;
  pointer-events: none;
}

@keyframes wa-pulse {
  0%   { transform: scale(0.95); opacity: 0.6; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* Tooltip-style label that appears on hover (desktop only) */
.wa-float::after {
  content: 'Chat on WhatsApp';
  position: absolute;
  right: 72px;
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: var(--ink-soft);
  border: 1px solid var(--rule);
  color: var(--paper-dim);
  padding: 8px 14px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.wa-float:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

@media (max-width: 640px) {
  .wa-float {
    right: 16px;
    bottom: 16px;
    width: 54px;
    height: 54px;
  }
  .wa-float svg { width: 26px; height: 26px; }
  .wa-float::after { display: none; }
}
