@charset "UTF-8";

/* =========================================================
   chippo.se — refined personal gateway
   Hermes-inspired atmosphere · Huly-inspired structure.
   Dark teal base, warm cream text, gold emblem accent.
   Vanilla CSS, no dependencies.
   ========================================================= */

:root {
  --bg: #041C1C;
  --bg-deep: #021212;
  --ink: #010A0A;
  --text: #FFE6CB;
  --muted: #C7CFC4;
  --muted-dim: #8A988D;
  --gold: #E8C37E;
  --gold-bright: #F6DCA6;
  --gold-deep: #C99A4E;
  --mint: #6EE7B7;
  --line: rgba(255, 230, 203, 0.16);
  --line-soft: rgba(255, 230, 203, 0.08);

  --display: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, "Courier New", monospace;

  --maxw: 1120px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg-deep);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(1100px 740px at 70% -12%, rgba(232, 195, 126, 0.12), transparent 60%),
    radial-gradient(900px 700px at 12% 18%, rgba(110, 231, 183, 0.06), transparent 58%),
    radial-gradient(1200px 1000px at 50% 50%, transparent 0%, rgba(1, 10, 10, 0.55) 100%),
    linear-gradient(170deg, var(--bg) 0%, var(--bg-deep) 55%, var(--ink) 100%);
}

h1, h2, h3 { margin: 0; line-height: 1.05; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
::selection { background: rgba(232, 195, 126, 0.35); color: #fff; }

/* ---------- Ambient glows ---------- */
.ambient {
  position: fixed;
  inset: -18vmax;
  z-index: -1;
  pointer-events: none;
  filter: blur(76px);
  opacity: .6;
}
.glow { position: absolute; width: 44vmax; height: 44vmax; border-radius: 50%; }
.glow-gold {
  top: -6vmax; right: -2vmax;
  background: radial-gradient(circle, rgba(232, 195, 126, 0.20), transparent 60%);
  animation: drift-a 24s ease-in-out infinite;
}
.glow-teal {
  bottom: -10vmax; left: -6vmax;
  background: radial-gradient(circle, rgba(110, 231, 183, 0.12), transparent 60%);
  animation: drift-b 30s ease-in-out infinite;
}
@keyframes drift-a {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(3vmax) scale(1.08); }
}
@keyframes drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-3vmax, -2vmax) scale(1.1); }
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--gold); color: var(--ink);
  padding: .65rem 1rem; border-radius: 0 0 10px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 4px; }

/* ---------- Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(20px); }
body.is-loaded [data-reveal] {
  animation: fade-up 1s var(--ease) forwards;
  animation-delay: var(--rd, 0s);
}
@keyframes fade-up { to { opacity: 1; transform: none; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(2, 18, 18, 0.78), rgba(2, 18, 18, 0.25));
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line-soft); }
.bar {
  max-width: var(--maxw); margin-inline: auto;
  padding: 1.15rem 1.7rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { font-family: var(--display); font-size: 1.18rem; color: var(--text); }
.brand-dim { color: var(--gold); }
.nav { display: flex; gap: 2rem; }
.nav a {
  font-size: .82rem; text-transform: uppercase; letter-spacing: .14em;
  color: var(--muted); position: relative; padding-bottom: 3px;
  transition: color .2s ease;
}
.nav a:hover { color: var(--text); }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -1px;
  width: 0; height: 1px; background: var(--gold); transition: width .3s var(--ease);
}
.nav a:hover::after { width: 100%; }

/* ---------- Hero (text left, emblem right) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(2.8rem, 7vw, 5.5rem) 1.7rem clamp(2rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}
/* discreet silhouette background, brighter on hover (Huly-like) */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("assets/images/bg-silhouette.jpg") center right / cover no-repeat;
  filter: invert(1) grayscale(1) contrast(1.05);
  mix-blend-mode: screen;
  opacity: .05;
  transition: opacity .7s var(--ease);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%, #000 75%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 30%, #000 75%, transparent);
}
.hero:hover .hero-bg { opacity: .17; }

.hero-text { position: relative; z-index: 2; }
.eyebrow {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .34em;
  color: var(--gold); margin-bottom: 1.3rem;
}
#hero-title {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2.4rem, 6.2vw, 4.4rem);
  letter-spacing: -.02em; line-height: 1.02;
  background: linear-gradient(180deg, #FFF4E4 0%, var(--text) 42%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.subtitle {
  margin-top: 1.1rem; font-size: clamp(.92rem, 2vw, 1.12rem);
  letter-spacing: .04em; color: var(--gold);
}
.lead {
  margin-top: 1.4rem; max-width: 50ch; color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
}
.lead strong { color: var(--text); font-weight: 600; }

.cta-row {
  margin-top: 2rem;
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center;
}
.btn-outline {
  display: inline-flex; align-items: center;
  padding: .9rem 1.7rem; border-radius: 9999px;
  border: 1px solid var(--line); color: var(--text);
  font-weight: 600; font-size: .82rem; letter-spacing: .07em; text-transform: uppercase;
  transition: border-color .22s ease, color .22s ease, transform .22s var(--ease);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.btn-text {
  color: var(--muted); font-size: .82rem; letter-spacing: .07em; text-transform: uppercase;
  padding: .4rem .6rem; transition: color .2s ease;
}
.btn-text:hover { color: var(--text); }

/* ---------- Emblem (bigger, semi-transparent, right) ---------- */
.hero-emblem {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  align-self: start;          /* cirkelns mittpunkt i nivå med "Personlig gateway"-raden */
  transform: translateY(-50%);
}
.emblem-halo {
  position: absolute; width: 110%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 195, 126, 0.26), rgba(232, 195, 126, 0.05) 46%, transparent 68%);
  filter: blur(20px);
  animation: halo 6s ease-in-out infinite;
}
@keyframes halo {
  0%, 100% { opacity: .7; transform: scale(1); }
  50%      { opacity: .95; transform: scale(1.06); }
}
.emblem-float {
  position: relative; z-index: 1;
  will-change: transform; transition: transform .14s linear;
  animation: float 7s ease-in-out infinite;
}
.emblem-img {
  height: clamp(290px, 40vw, 470px); width: auto;
  /* PNG now has a baked-in transparent background — no blend/box needed.
     Slightly lowered opacity so the emblem blends softly into the page. */
  opacity: .9;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

/* ---------- Big portfolio link (key/door reveals on hover) ---------- */
.portal-wrap {
  max-width: var(--maxw); margin-inline: auto;
  padding: clamp(1rem, 3vw, 2rem) 1.7rem;
}
.portal-link {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 26px;
  padding: clamp(2rem, 5vw, 3.4rem);
  min-height: clamp(200px, 28vw, 280px);
  border: 1px solid var(--line-soft);
  background:
    radial-gradient(700px 320px at 18% 0%, rgba(232, 195, 126, 0.10), transparent 70%),
    linear-gradient(160deg, rgba(255, 230, 203, 0.05), rgba(2, 18, 18, 0.3));
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  transition: transform .35s var(--ease), border-color .35s ease, box-shadow .35s ease;
}
.key-bg {
  position: absolute; inset: 0; z-index: 0;
  background: url("assets/images/portfolio-key.png") 84% center / contain no-repeat;
  mix-blend-mode: screen;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity .55s var(--ease), transform .8s var(--ease);
  pointer-events: none;
}
.portal-link:hover {
  transform: translateY(-4px);
  border-color: rgba(232, 195, 126, 0.5);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
}
.portal-link:hover .key-bg { opacity: .5; transform: scale(1); }
.pl-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: .7rem;
  max-width: 62%;
}
.pl-eyebrow {
  font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold);
}
.pl-title {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.8rem, 4.2vw, 2.9rem); letter-spacing: -.015em;
  line-height: 1.05;
  background: linear-gradient(180deg, #FFF4E4, var(--gold) 120%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.pl-sub { color: var(--muted); font-size: 1rem; max-width: 40ch; }
.pl-go {
  margin-top: .5rem;
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .9rem; letter-spacing: .04em; color: var(--gold-bright); font-weight: 600;
}
.pl-arrow { transition: transform .3s var(--ease); }
.portal-link:hover .pl-arrow { transform: translateX(6px); }

/* ---------- Gateway cards ---------- */
.gateway {
  max-width: var(--maxw); margin-inline: auto;
  padding: clamp(2rem, 5vw, 3rem) 1.7rem clamp(3.5rem, 7vw, 5.5rem);
}
.section-title {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem); letter-spacing: -.01em;
  margin-bottom: clamp(1.6rem, 4vw, 2.2rem); color: var(--text);
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}
.card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: .55rem;
  padding: 1.9rem 1.8rem; border-radius: 22px;
  background: linear-gradient(165deg, rgba(255, 230, 203, 0.045), rgba(2, 18, 18, 0.25));
  border: 1px solid var(--line-soft);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  transition: transform .3s var(--ease), border-color .3s ease, box-shadow .3s ease;
}
.card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(440px 220px at var(--mx, 50%) -10%, rgba(232, 195, 126, 0.12), transparent 70%);
  opacity: 0; transition: opacity .3s ease; pointer-events: none;
}
.card:hover {
  transform: translateY(-6px); border-color: rgba(232, 195, 126, 0.45);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4);
}
.card:hover::before { opacity: 1; }
.card-tag { font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.card h3 { font-family: var(--display); font-weight: 500; font-size: 1.5rem; letter-spacing: -.01em; }
.card p { color: var(--muted); font-size: .95rem; }
.card-link {
  margin-top: auto; padding-top: .9rem;
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .82rem; letter-spacing: .03em; color: var(--gold);
}
.card-arrow { transition: transform .25s var(--ease); }
.card:hover .card-arrow { transform: translateX(5px); }

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--maxw); margin-inline: auto;
  padding: 2.2rem 1.7rem 3.2rem;
  border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.6rem;
  font-size: .85rem; color: var(--muted-dim);
}
.foot-copy { color: var(--muted); }
.foot-note { flex: 1; }
.footer-links { display: flex; gap: 1.4rem; }
.footer-links a {
  color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .76rem;
  transition: color .2s ease;
}
.footer-links a:hover { color: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; text-align: left; }
  .hero-emblem { order: -1; transform: none; }
  .emblem-img { height: clamp(210px, 48vw, 300px); }
  .hero-bg { -webkit-mask-image: none; mask-image: none; }
  .pl-content { max-width: 100%; }
  .key-bg { background-position: center; }
  .portal-link:hover .key-bg { opacity: .32; }
}
@media (max-width: 560px) {
  .bar { padding: 1rem 1.2rem; }
  .nav { gap: 1.2rem; }
  .nav a { letter-spacing: .08em; }
  .foot-note { flex-basis: 100%; order: 4; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .emblem-float { transform: none !important; }
  .glow-gold, .glow-teal { display: none; }
}
