/* ===========================================================
   Mattias Burström, personal site
   Warm, personal, subtly animated
   =========================================================== */

:root {
  --bg:        #fbf6ec;
  --bg-soft:   #f4ebda;
  --card:      #ffffff;
  --ink:       #2e2a24;
  --ink-soft:  #6b6256;
  --accent:    #d9622b;   /* warm terracotta */
  --accent-2:  #2f7d5a;   /* forest green   */
  --gold:      #e3a72f;
  --shadow:    0 18px 40px -18px rgba(70, 50, 30, 0.35);
  --radius:    22px;
  --maxw:      1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 80% -10%, #fff5e3 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 20%, #f1f7ee 0%, transparent 55%),
    var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.15;
  margin: 0;
}

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

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

/* ---------- Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 48px 16px 24px;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 300px at 50% 30%, rgba(227,167,47,0.18), transparent 70%);
  pointer-events: none;
}

.hero__image {
  width: 100%;
  max-width: 760px;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 22px 30px rgba(60,40,20,0.22));
  animation: floaty 7s ease-in-out infinite;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

.hero__tagline {
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  color: var(--ink-soft);
  font-family: Georgia, serif;
  font-style: italic;
  max-width: 620px;
  margin: 8px auto 0;
}

.scroll-cue {
  display: inline-block;
  margin-top: 26px;
  color: var(--accent-2);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  font-family: "Segoe UI", sans-serif;
}
.scroll-cue span {
  display: block;
  font-size: 1.4rem;
  margin-top: 2px;
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* ---------- About ---------- */
.about {
  padding: 30px 0 10px;
}
.about__card {
  background: linear-gradient(180deg, var(--card), #fffdf8);
  border: 1px solid rgba(170,140,90,0.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px clamp(24px, 5vw, 56px);
  max-width: 860px;
  margin: 0 auto;
}
.eyebrow {
  display: inline-block;
  font-family: "Segoe UI", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(217,98,43,0.10);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.about__card h2 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  margin-bottom: 14px;
}
.about__card p {
  color: var(--ink-soft);
  font-size: 1.06rem;
  margin: 0 0 14px;
}
.about__card p:last-child { margin-bottom: 0; }

/* ---------- Section heading ---------- */
.section-head {
  text-align: center;
  margin: 64px auto 8px;
  max-width: 640px;
}
.section-head h2 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}
.section-head p {
  color: var(--ink-soft);
  margin-top: 8px;
}

/* ---------- Activity grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 36px 0 20px;
}

.card {
  background: linear-gradient(180deg, #ffffff, #fffaf0);
  border: 1px solid rgba(170,140,90,0.16);
  border-radius: var(--radius);
  padding: 26px 22px 28px;
  text-align: center;
  box-shadow: 0 12px 26px -16px rgba(70,50,30,0.30);
  transition: transform 0.35s cubic-bezier(.2,.7,.3,1), box-shadow 0.35s ease;
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 26px 44px -20px rgba(70,50,30,0.45);
}
.card__imgwrap {
  background: radial-gradient(circle at 50% 40%, #fff6e6, #f3ead7);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 18px;
}
.card img {
  width: 100%;
  max-width: 180px;
  height: 180px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  transition: transform 0.4s ease;
}
.card:hover img { transform: scale(1.06) rotate(-1.5deg); }

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 6px;
}
.card p {
  color: var(--ink-soft);
  font-size: 0.97rem;
  margin: 0;
}

/* ---------- Top navigation ---------- */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 24px;
}
.nav__brand {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
}
.nav__links a {
  margin-left: 24px;
  text-decoration: none;
  color: var(--ink-soft);
  font-family: "Segoe UI", sans-serif;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.nav__links {
  display: flex;
  align-items: center;
}
.nav__links a:hover,
.nav__links a.is-active {
  color: var(--accent);
}
.lang-flags {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: 22px;
}
.lang-flag {
  display: inline-flex;
  padding: 0;
  margin: 0;
  border: 2px solid transparent;
  border-radius: 5px;
  background: none;
  line-height: 0;
  cursor: pointer;
  opacity: 0.5;
  overflow: hidden;
  transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.lang-flag svg {
  display: block;
  width: 28px;
  height: 19px;
  border-radius: 3px;
}
.lang-flag:hover {
  opacity: 1;
  transform: translateY(-1px);
}
.lang-flag.is-active {
  opacity: 1;
  border-color: var(--accent);
}
.lang-flag:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(227,167,47,0.35);
}
@media (max-width: 560px) {
  .nav { flex-wrap: wrap; gap: 10px; justify-content: center; }
  .nav__links a:first-child { margin-left: 0; }
}

/* ---------- Call to action (home page) ---------- */
.cta {
  margin: 64px 0 20px;
}
.cta__card {
  text-align: center;
  background: linear-gradient(160deg, #fbe7d6 0%, #f7d6bd 100%);
  border: 1px solid rgba(217,98,43,0.22);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(36px, 5vw, 56px);
  max-width: 720px;
  margin: 0 auto;
}
.cta__card h2 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  color: var(--ink);
  margin-bottom: 8px;
}
.cta__card p {
  color: var(--ink-soft);
  margin: 0 0 24px;
}

/* ---------- Contact ---------- */
.contact {
  margin: 30px 0 60px;
}
.contact__card {
  background: linear-gradient(180deg, #ffffff, #fffaf0);
  border: 1px solid rgba(170,140,90,0.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(32px, 5vw, 56px);
  max-width: 720px;
  margin: 0 auto;
  color: var(--ink);
}
.contact__card h2 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  color: var(--ink);
  margin-bottom: 8px;
}
.contact__card > p {
  color: var(--ink-soft);
  margin: 0 0 26px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  font-family: "Segoe UI", sans-serif;
}
.field input,
.field textarea {
  width: 100%;
  border: 1px solid rgba(170,140,90,0.30);
  background: #fffdf9;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(227,167,47,0.30);
}
.field textarea { min-height: 130px; resize: vertical; }
.field .hint {
  display: block;
  font-size: 0.74rem;
  color: var(--ink-soft);
  margin-top: 5px;
}

.btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  background: var(--gold);
  color: #3a2a08;
  font-weight: 700;
  font-size: 1.02rem;
  font-family: "Segoe UI", sans-serif;
  padding: 14px 34px;
  border-radius: 999px;
  box-shadow: 0 10px 22px -10px rgba(0,0,0,0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover {
  transform: translateY(-2px);
  background: #f0b53e;
  box-shadow: 0 16px 26px -12px rgba(0,0,0,0.55);
}
.btn:active { transform: translateY(0); }

.btn--accent {
  background: var(--accent);
  color: #fff;
}
.btn--accent:hover {
  background: #c9551f;
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 30px 16px 50px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.footer a { text-decoration: none; }

/* ---------- Social links ---------- */
.social {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin: 0 0 16px;
}
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--ink);
  border: 1px solid rgba(170,140,90,0.25);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.social a:hover {
  transform: translateY(-3px);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 18px -10px rgba(217,98,43,0.7);
}
.social svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}
.contact__social {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(170,140,90,0.20);
  text-align: center;
}
.contact__social p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0 0 14px;
}

/* ---------- Thank-you page ---------- */
.thanks {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}
.thanks__card {
  background: linear-gradient(180deg, #ffffff, #fffaf0);
  border: 1px solid rgba(170,140,90,0.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(36px, 6vw, 64px);
  max-width: 560px;
  animation: pop 0.6s cubic-bezier(.2,.8,.3,1.2) both;
}
@keyframes pop {
  0%   { opacity: 0; transform: scale(0.9) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.thanks__icon {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: var(--accent-2);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem;
  margin: 0 auto 22px;
  animation: floaty 5s ease-in-out infinite;
}
.thanks__card h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin-bottom: 12px;
}
.thanks__card p {
  color: var(--ink-soft);
  font-size: 1.08rem;
  margin: 0 0 28px;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.7,.3,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* stagger cards */
.grid .card:nth-child(3n+2) { transition-delay: 0.08s; }
.grid .card:nth-child(3n+3) { transition-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
  *, .hero__image, .thanks__icon, .scroll-cue span {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
