/* Tillfälligt typsnitt: Red Hat Mono (fri licens, ligger i fonts/).
   Byt till Letter Gothic via Adobe Fonts senare: lägg in Adobes länk i
   index.html, ändra --font till Letter Gothic och sätt vikterna till 700 / 400. */
@font-face {
  font-family: "Red Hat Mono";
  src: url("../fonts/RedHatMono-latin.woff2") format("woff2");
  font-weight: 300 500;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Red Hat Mono";
  src: url("../fonts/RedHatMono-latin-ext.woff2") format("woff2");
  font-weight: 300 500;
  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+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --yellow: #FAFF91;
  --ink: #111;
  --font: "Red Hat Mono", "Menlo", "Consolas", monospace;
  --w-main: 400;   /* huvudtext (motsvarar Letter Gothic Bold) */
  --w-light: 300;  /* namnraden (motsvarar Letter Gothic Regular) */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-weight: var(--w-main);
  background: #e9eaee url("../images/marble.jpg") center / cover fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- 1. Logga ---------- */
.hero {
  height: 100vh;
  height: 100svh;
  display: grid;
  place-items: center;
  position: relative;
}

.hero__logo {
  width: min(42vw, 300px);
  height: auto;
  will-change: transform;
  animation: logo-in 1.4s cubic-bezier(.2, .9, .2, 1) both;
}

@keyframes logo-in {
  from { transform: translateY(60px); opacity: 0; }
}

.hero__down {
  position: absolute;
  bottom: 28px;
  left: 50%;
  margin-left: -.5em;
  color: var(--ink);
  text-decoration: none;
  font-size: 28px;
  animation: bob 2s ease-in-out infinite;
}

@keyframes bob {
  50% { transform: translateY(8px); }
}

/* ---------- 2. Meny + panel ---------- */
.info {
  min-height: 100vh;
  min-height: 100svh;
  padding: 12vh 16px 16vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 1240px;
}

.menu__btn {
  font: inherit;
  font-size: 19px;
  letter-spacing: .08em;
  padding: 9px 16px 7px;
  border: 0;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  transition: background .25s, color .25s;
}

.menu__btn.is-active {
  background: var(--yellow);
  color: var(--ink);
}

.panel {
  position: relative;
  display: grid;
  width: 100%;
  max-width: 1240px;
  background: var(--yellow);
  padding: clamp(24px, 4vw, 48px);
  overflow: hidden;
  isolation: isolate;
  will-change: transform;
}

/* Alla texter ligger i samma cell, osynliga. Panelens höjd glider
   mjukt till den aktiva textens höjd (styrs i main.js). */
.panel > * { grid-area: 1 / 1; align-self: start; }
.panel__content { visibility: hidden; }
/* Den aktiva texten är osynlig men läsbar för skärmläsare */
.panel__content.is-current { visibility: visible; opacity: 0; }
.panel__live { position: relative; }

.panel p { margin: 0; }
.panel a { color: inherit; text-decoration: none; }
.panel a:hover { text-decoration: underline; }

.t-center { text-align: center; padding: 1.5em 0; }

/* Rak högerkant, men sista raden vänsterställd så den inte blir spärrad */
.t-about,
.t-clients {
  font-size: clamp(17px, 2.7vw, 34px);
  line-height: 1.5;
  letter-spacing: .1em;
  text-align: justify;
  text-align-last: left;
}

.t-name {
  font-weight: var(--w-light);
  font-size: clamp(17px, 2.5vw, 31px);
  line-height: 1.4;
  letter-spacing: .1em;
  margin-bottom: 1.2em !important;
}

.t-contact {
  font-size: clamp(17px, 3.3vw, 41px);
  line-height: 1.4;
  letter-spacing: .08em;
  word-break: break-word;
}

.sep { opacity: .35; }
.code { opacity: .55; font-weight: var(--w-light); }

/* Blinkande markör */
.cursor {
  display: inline-block;
  width: .6em;
  height: .95em;
  margin-left: .05em;
  vertical-align: -.1em;
  background: var(--ink);
  animation: blink 1s steps(1) infinite;
}

.is-typing .cursor { animation: none; }

@keyframes blink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__logo, .hero__down, .cursor { animation: none; }
}
