/* Aki Cuts — sistem de design comun (site + aplicație)
   Sumi (cerneală) · Washi (hârtie) · Shu (vermillion) · Kin (auriu) */

:root {
  --ink: #0b0a09;
  --ink-1: #11100e;
  --ink-2: #181613;
  --ink-3: #221f1b;
  --line: #2c2823;
  --line-2: #3a352e;
  --paper: #f1ebe0;
  --paper-2: #d9d0c1;
  --mute: #a39886;
  --mute-2: #776d5f;
  --shu: #c8372d;
  --shu-2: #e0483c;
  --shu-ink: #3a1210;
  --kin: #bfa06a;
  --ok: #6fae7d;
  --warn: #d9a441;

  --f-display: 'Cormorant Garamond', 'Noto Serif JP', Georgia, serif;
  --f-jp: 'Noto Serif JP', 'Yu Mincho', serif;
  --f-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  --r: 2px;
  --pad: clamp(20px, 5vw, 72px);
  --maxw: 1360px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
::selection { background: var(--shu); color: #fff; }

.jp { font-family: var(--f-jp); font-weight: 500; }
.display { font-family: var(--f-display); font-weight: 400; letter-spacing: -.01em; line-height: .95; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--mute);
}
.eyebrow .jp { color: var(--shu); letter-spacing: .1em; font-size: 14px; }
.eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; opacity: .6; }
.muted { color: var(--mute); }
.shu { color: var(--shu); }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

/* Grain de hârtie peste tot */
.grain {
  position: fixed; inset: -50%; z-index: 9000; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-1%, 3%); } 80% { transform: translate(3%, 1%); } 100% { transform: translate(0, 0); }
}

/* ---------- Butoane ---------- */
.btn {
  --bg: var(--shu); --fg: #fff;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: 54px; padding: 0 28px; border-radius: var(--r);
  background: var(--bg); color: var(--fg);
  font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  overflow: hidden; isolation: isolate; white-space: nowrap;
  transition: transform .5s var(--ease), opacity .3s;
}
.btn::after {
  content: ''; position: absolute; inset: 0; z-index: -1; background: var(--paper);
  transform: translateY(101%); transition: transform .6s var(--ease);
}
.btn:hover::after { transform: translateY(0); }
.btn:hover { color: var(--ink); }
.btn > * { transition: color .3s; }
.btn .arrow { width: 18px; height: 1px; background: currentColor; position: relative; transition: width .5s var(--ease); }
.btn .arrow::after { content: ''; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
.btn:hover .arrow { width: 28px; }
.btn--ghost { --bg: transparent; --fg: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--ghost::after { background: var(--paper); }
.btn--dark { --bg: var(--ink-3); }
.btn--sm { height: 42px; padding: 0 18px; font-size: 11px; letter-spacing: .18em; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.is-loading { pointer-events: none; color: transparent !important; }
.btn.is-loading::before {
  content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.link-u { position: relative; }
.link-u::after { content: ''; position: absolute; left: 0; bottom: -3px; width: 100%; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease); }
.link-u:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Formulare ---------- */
.field { display: grid; gap: 8px; }
.field > span { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--mute); }
.input, .select, .textarea {
  width: 100%; height: 52px; padding: 0 16px; border-radius: var(--r);
  background: var(--ink-1); border: 1px solid var(--line); color: var(--paper);
  transition: border-color .3s, background .3s; outline: none; font-size: 16px;
}
.textarea { height: auto; min-height: 96px; padding: 14px 16px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--shu); background: var(--ink-2); }
.input::placeholder { color: var(--mute-2); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.form-err { color: var(--shu-2); font-size: 14px; min-height: 1em; }

/* ---------- Toast ---------- */
.toasts { position: fixed; z-index: 9500; left: 50%; top: calc(14px + var(--safe-t)); transform: translateX(-50%); display: grid; gap: 10px; width: min(92vw, 420px); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 18px; background: var(--paper); color: var(--ink); border-radius: var(--r);
  box-shadow: 0 20px 60px rgba(0,0,0,.5); font-size: 14px; line-height: 1.45;
  animation: toastIn .6s var(--ease) both;
}
.toast.err { background: var(--shu); color: #fff; }
.toast .jp { font-size: 18px; line-height: 1; }
.toast.out { animation: toastOut .4s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

/* încadrare poză Cornel (subiectul e în partea de jos a fotografiei) */
[data-id="cornel"] img { object-position: 50% 78% !important; }

/* ---------- Ensō (cerc zen pictat) ---------- */
.enso path { fill: none; stroke: var(--shu); stroke-linecap: round; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .grain { display: none; }
}
