/*
Theme Name: Kaiwur Public
Theme URI: https://kaiwur.fi
Author: Kaiwur Oy
Description: Minimal public-facing theme for the Kaiwur Store compliance pages.
  Aligned with the Kaiwur Store landing page design system: Manrope font, brand green
  accents, clean centered layout. No navigation, minimal footer, no block editor.
Version: 1.0.0
License: GPL-2.0-or-later
Text Domain: kaiwur-public
*/

/* ─── Design Tokens ─── */
:root {
  --brand-green: #09AE4F;
  --brand-green-text: #047A3B;
  --brand-green-bg: #047A3B;
  --brand-accent-bg: #D1FAE5;
  --text-primary: #111111;
  --text-secondary: #6B7280;
  --bg: #ffffff;
  --border: #E5E7EB;
  --navbar-bg: #F8F8F8;
  --max-width: 720px;
  --radius: 8px;
}

/* ─── Font ─── */
@font-face {
  font-family: "Manrope";
  src: url("./assets/fonts/manrope.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-display: swap;
}

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

::selection {
  background-color: #C6F6D5;
  color: var(--text-primary);
}

/* ─── Body — full-height flex column ─── */
body {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ─── Minimal Header (logo only, no nav) ─── */
.site-header {
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--navbar-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: center;
}

.site-header img {
  height: 32px;
  width: auto;
}

.site-logo-link {
  display: inline-flex;
  line-height: 0;
  transition: opacity 0.15s ease;
}

.site-logo-link:hover {
  opacity: 0.75;
}

/* ─── Main Content ─── */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  padding: 3rem 1.5rem;
}

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: 1.75rem; margin-bottom: 1rem; }
h2 { font-size: 1.375rem; margin-top: 2.5rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.125rem; margin-top: 2rem; margin-bottom: 0.5rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

p + p {
  margin-top: 0;
}

a {
  color: var(--brand-green-text);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brand-green-bg);
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.375rem;
}

/* ─── Forms ─── */
form {
  margin-top: 1.5rem;
}

form p {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.375rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

input[type="email"],
input[type="text"] {
  width: 100%;
  max-width: 400px;
  padding: 0.625rem 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="email"]:focus,
input[type="text"]:focus {
  outline: none;
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(9, 174, 79, 0.15);
}

button,
input[type="submit"] {
  display: inline-block;
  padding: 0.625rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: #ffffff;
  background-color: var(--brand-green-bg);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

button:hover,
input[type="submit"]:hover {
  background-color: #036B31;
}

button:focus-visible,
input[type="submit"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(9, 174, 79, 0.3);
}

/* ─── Tamagui-style Toast ─── */
@keyframes kaiwur-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes kaiwur-toast-out {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

.kaiwur-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  font-size: 0.9375rem;
  line-height: 1.5;
  max-width: 480px;
  width: calc(100% - 2rem);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  animation: kaiwur-toast-in 0.2s ease-out;
  border: 1px solid;
}

.kaiwur-toast-icon {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-size: 0.8125rem;
  line-height: 1;
  margin-top: 0.125rem;
  font-weight: 700;
}

.kaiwur-toast p {
  flex: 1;
  margin: 0;
  padding-top: 0.125rem;
}

.kaiwur-toast--success {
  background-color: #ffffff;
  border-color: #bbf7d0;
  color: #166534;
}

.kaiwur-toast--success .kaiwur-toast-icon {
  background-color: var(--brand-green);
  color: #ffffff;
}

.kaiwur-toast--error {
  background-color: #ffffff;
  border-color: #fecaca;
  color: #991b1b;
}

.kaiwur-toast--error .kaiwur-toast-icon {
  background-color: #dc2626;
  color: #ffffff;
}

.kaiwur-toast-dismiss {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  margin-top: 0.125rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  border-radius: 9999px;
  background: transparent;
  color: inherit;
  opacity: 0.4;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.kaiwur-toast-dismiss:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.06);
}

/* ─── Front Page Link Cards ─── */
.front-page-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 50vh;
  padding: 2rem 0;
}

.front-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 360px;
  padding: 1.25rem 1.5rem;
  background: var(--navbar-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.front-page-link:hover {
  border-color: var(--brand-green);
  background: #f0fdf4;
  color: var(--brand-green-text);
}

.front-page-link--danger {
  color: #dc2626;
}

.front-page-link--danger:hover {
  border-color: #dc2626;
  background: #fef2f2;
  color: #991b1b;
}

/* ─── Turnstile Widget ─── */
.cf-turnstile {
  margin: 1rem 0;
}

/* ─── Account Deletion Fine Print ─── */
.deletion-fine-print {
  margin-top: 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .site-header {
    padding: 0.75rem 1rem;
  }

  .site-header img {
    height: 24px;
  }

  main {
    padding: 2rem 1rem;
  }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
}
