/* dough.cafe — shared stylesheet */

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

:root {
  --cream: #F7F3EE;
  --warm-white: #FDFAF7;
  --ink: #2C2820;
  --ink-muted: #7A6F64;
  --ink-faint: #B5AC9F;
  --accent: #C4895A;
  --accent-soft: #EDD9C5;
  --border: rgba(44, 40, 32, 0.1);
}

/* ─── Base ─────────────────────────────── */

html, body {
  height: 100%;
}

body {
  background-color: var(--cream);
  color: var(--ink);
  font-family: 'Lora', Georgia, serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Subtle noise texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ─── Layout ────────────────────────────── */

main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  padding: clamp(4rem, 12vh, 7rem) 2rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 2rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.6875rem;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  text-align: center;
}

/* ─── Home: cat portrait ─────────────────── */

.cat-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 3rem;
}

.cat-frame {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: default;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.cat-frame:hover {
  transform: scale(1.04) rotate(-1deg);
  box-shadow: 0 8px 32px rgba(196, 137, 90, 0.2);
}

.cat-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cat-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.cat-placeholder svg {
  width: 52px;
  height: 52px;
  opacity: 0.5;
}

.cat-placeholder span {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  color: var(--accent);
  opacity: 0.7;
  letter-spacing: 0.08em;
}

.upload-hint {
  display: block;
  align-self: stretch;
  width: 100%;
  min-height: 30em;
  margin: 0;
  margin-top: min(5vw, 2rem);
  font-family: 'DM Mono', monospace;
  font-size: 0.5rem;
  line-height: 1;
  color: var(--ink-faint);
  white-space: pre;
  letter-spacing: 0;
  text-align: left;
}

/* ─── Home: greeting & title ─────────────── */

.greeting {
  font-size: clamp(1rem, 3vw, 1.125rem);
  font-style: italic;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
  animation: fadein 1.2s ease both;
}

h1.site-name {
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.6rem;
  animation: fadein 1s ease both 0.1s;
}

h1.site-name span {
  color: var(--accent);
}

.tagline {
  font-size: 0.875rem;
  font-family: 'DM Mono', monospace;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  white-space: nowrap;
  margin-bottom: 3.5rem;
  animation: fadein 1s ease both 0.2s;
}

/* ─── Home: nav ──────────────────────────── */

nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  animation: fadein 1s ease both 0.4s;
}

nav a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink);
  font-family: 'Lora', serif;
  font-size: 1.0625rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

nav a:first-child {
  border-top: 1px solid var(--border);
}

nav a .link-label {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

nav a .link-index {
  font-family: 'DM Mono', monospace;
  font-size: 0.6875rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

nav a .link-sub {
  font-size: 0.75rem;
  font-family: 'DM Mono', monospace;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--accent);
  padding-left: 0.25rem;
}

nav a:hover .link-sub,
nav a:hover .link-index {
  color: var(--accent);
  opacity: 0.6;
}

/* ─── Inner pages ────────────────────────── */

main.inner {
  align-items: flex-start;
  padding-top: clamp(3rem, 10vh, 6rem);
}

.back {
  display: block;
  margin-bottom: 3rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--ink-faint);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.2s ease;
}

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

.section-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.6875rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

h1.page-title {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.subtitle {
  font-style: italic;
  color: var(--ink-muted);
  font-size: 1rem;
  margin-bottom: 3rem;
  line-height: 1.7;
}

.placeholder-box {
  width: 100%;
  border: 1px dashed var(--ink-faint);
  border-radius: 8px;
  padding: 2.5rem;
  text-align: center;
  color: var(--ink-faint);
  font-family: 'DM Mono', monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  line-height: 1.8;
}

/* ─── Animation ──────────────────────────── */

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

/* ─── Responsive ─────────────────────────── */

@media (max-width: 480px) {
  main {
    padding-top: 2.2rem;
    padding-bottom: 1.2rem;
  }
  .cat-frame {
    width: 116px;
    height: 116px;
  }
  .cat-placeholder span {
    font-size: 0.52rem;
    letter-spacing: 0.06em;
  }
  .upload-hint {
    margin-top: min(4vw, 1rem);
  }
  .tagline {
    font-size: 0.72rem;
    margin-bottom: 1.8rem;
    letter-spacing: 0.03em;
  }
  nav a {
    padding: 0.82rem 0;
  }
}
