/*
Theme Name: Unscratch
Theme URI: https://unscratch.app
Author: Unscratch
Description: Unscratch landing tema — tamsus fonas, sidabrinės folijos akcentas. Be page builder'ių.
Version: 1.0.0
Requires PHP: 8.1
License: GNU General Public License v2 or later
Text Domain: unscratch
*/

/* ===== Šriftai ===== */
@font-face {
  font-family: 'Space Grotesk';
  src: url('assets/fonts/space-grotesk-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('assets/fonts/space-grotesk-latin-ext.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ===== Kintamieji ===== */
:root {
  --bg: #0a0c10;
  --surface: #11151c;
  --line: #232a34;
  --text: #e8eaee;
  --muted: #9aa2ae;
  --faint: #6b7380;
  --foil: linear-gradient(110deg, #878c94 0%, #dfe2e7 24%, #a6abb4 46%, #f0f2f4 62%, #b3b8c0 78%, #8a8f97 100%);
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --container: 1060px;
}

/* ===== Bazė ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--text); text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--faint); }
a:hover { text-decoration-color: var(--text); }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 0.6em; font-weight: 500; }
::selection { background: #c9ced6; color: #0a0c10; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }

/* Folijos tekstas */
.foil {
  background: var(--foil);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (prefers-reduced-motion: no-preference) {
  .foil-shine { animation: sheen 9s ease-in-out infinite alternate; }
  @keyframes sheen { from { background-position: 0% 0; } to { background-position: 100% 0; } }
}

/* ===== Antraštė ===== */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 0.9rem; }
.wordmark { font-family: var(--display); font-weight: 500; font-size: 1.3rem; letter-spacing: 0.01em; text-decoration: none; }
.wordmark .foil { transition: filter .3s; }
.wordmark:hover .foil { filter: brightness(1.15); }

/* Mygtukai */
.btn { display: inline-block; font-family: var(--display); font-weight: 500; font-size: 1rem; text-decoration: none; border-radius: 10px; padding: 0.72em 1.5em; cursor: pointer; border: 0; transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-foil { background: var(--foil); background-size: 160% 100%; color: #101318; box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 4px 18px rgba(0,0,0,.45); }
.btn-foil:hover { background-position: 60% 0; filter: brightness(1.05); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); padding: 0.55em 1.1em; font-size: 0.95rem; }
.btn-ghost:hover { border-color: var(--faint); }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 7vw, 6rem); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97'%3E%3Cg fill='none' stroke='%23222a35' stroke-width='1'%3E%3Cpath d='M28 0l28 16v32L28 64 0 48V16z'/%3E%3Cpath d='M28 64l28 16v32M28 64L0 80v32'/%3E%3C/g%3E%3C/svg%3E");
  opacity: .35;
  -webkit-mask-image: radial-gradient(90% 80% at 60% 30%, #000 0%, transparent 75%);
  mask-image: radial-gradient(90% 80% at 60% 30%, #000 0%, transparent 75%);
}
.hero-inner { position: relative; display: grid; gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 6.4vw, 3.9rem); font-weight: 500; max-width: 13ch; }
.hero .lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--muted); max-width: 46ch; margin: 0 0 2rem; }
.hero-cta { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.hero-note { color: var(--faint); font-size: .9rem; }
.hero-visual { display: flex; justify-content: center; }
.hero-visual svg { width: min(78vw, 300px); filter: drop-shadow(0 30px 60px rgba(0,0,0,.55)); }
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.15fr .85fr; }
  .hero-visual svg { width: 320px; }
}

/* ===== Kaip veikia ===== */
.how { padding-block: clamp(3rem, 7vw, 5.5rem); border-top: 1px solid var(--line); }
.how h2, .beta h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.kicker { font-family: var(--display); font-size: .85rem; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); margin: 0 0 0.9rem; }
.steps { display: grid; gap: 2.2rem; margin-top: 2.5rem; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }
.step-num { font-family: var(--display); font-weight: 700; font-size: 2.6rem; line-height: 1; display: inline-block; margin-bottom: .7rem; }
.step h3 { font-size: 1.2rem; margin-bottom: .4em; }
.step p { color: var(--muted); margin: 0; font-size: 1rem; }

/* ===== Privatumo juosta ===== */
.privacy-strip { border-top: 1px solid var(--line); background: var(--surface); padding-block: clamp(2.8rem, 6vw, 4.5rem); }
.privacy-strip .statement { font-family: var(--display); font-size: clamp(1.5rem, 3.6vw, 2.2rem); font-weight: 500; letter-spacing: -0.01em; max-width: 24ch; margin: 0 0 .8rem; }
.privacy-strip p { color: var(--muted); max-width: 60ch; margin: 0 0 1.2rem; }
.privacy-strip a { color: var(--muted); }

/* ===== Beta forma ===== */
.beta { padding-block: clamp(3.5rem, 8vw, 6.5rem); border-top: 1px solid var(--line); }
.beta-inner { max-width: 560px; margin-inline: auto; text-align: center; }
.beta p.sub { color: var(--muted); margin: 0 0 2rem; }
.waitlist-form { display: flex; flex-direction: column; gap: .8rem; }
@media (min-width: 560px) { .waitlist-form { flex-direction: row; } .waitlist-form input { flex: 1; } }
.waitlist-form input[type=email] {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: .72em 1em; min-width: 0;
}
.waitlist-form input[type=email]::placeholder { color: var(--faint); }
.waitlist-form input[type=email]:focus { outline: none; border-color: #aeb4bd; box-shadow: 0 0 0 3px rgba(174,180,189,.18); }
.waitlist-form button:disabled { opacity: .6; cursor: wait; }
.waitlist-msg { margin-top: 1.1rem; padding: .9em 1.1em; border-radius: 10px; font-size: .98rem; }
.waitlist-msg.ok { background: #14201a; border: 1px solid #2c4a38; color: #c9e5d3; }
.waitlist-msg.err { background: #241518; border: 1px solid #543036; color: #ecc8cd; }
.consent { color: var(--faint); font-size: .85rem; margin-top: 1.2rem; line-height: 1.55; }
.consent a { color: var(--faint); }

/* ===== Poraštė ===== */
.site-footer { border-top: 1px solid var(--line); padding-block: 2rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; color: var(--faint); font-size: .92rem; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer-inner a { color: var(--muted); text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }

/* ===== Vidiniai puslapiai ===== */
.page-main { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.prose { max-width: 70ch; margin-inline: auto; }
.prose h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); margin-bottom: 1em; }
.prose h2 { font-size: 1.45rem; margin-top: 2.2em; padding-top: 1.1em; border-top: 1px solid var(--line); }
.prose h3 { font-size: 1.15rem; margin-top: 1.8em; }
.prose p, .prose li { color: #c6ccd4; }
.prose li { margin-bottom: .4em; }
.prose strong { color: var(--text); }
.prose blockquote { margin: 1.5em 0; padding: .8em 1.2em; border-left: 3px solid var(--faint); background: var(--surface); border-radius: 0 10px 10px 0; color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.prose .lead { font-size: 1.2rem; color: var(--text); }
.table-scroll { overflow-x: auto; margin: 1.5em 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: .6em .9em; border: 1px solid var(--line); color: #c6ccd4; vertical-align: top; }
.prose th { font-family: var(--display); font-weight: 500; color: var(--text); background: var(--surface); }

/* 404 */
.err404 { text-align: center; padding-block: clamp(4rem, 12vw, 8rem); }
.err404 h1 { font-size: clamp(2rem, 6vw, 3rem); }
.err404 p { color: var(--muted); margin-bottom: 2rem; }

/* Prieinamumas */
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
:focus-visible { outline: 2px solid #c9ced6; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
