/* ============================================================================
   caractera — under construction page
   Layered single file: reset → fonts → tokens → base → layout → components → motion
   ============================================================================ */

/* --- 1. Reset / normalize ----------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

:focus {
  outline: none;
}

/* --- 2. Fonts ----------------------------------------------------------- */
/* Plein — Pangram Pangram Foundry, licensed and self-hosted.
   Files: assets/fonts/Plein-Regular.woff2, assets/fonts/Plein-Bold.woff2.
   unicode-range covers Latin + Latin Extended A/B explicitly enumerating the
   Romanian-specific codepoints (Ă/ă, Â/â, Î/î, Ș/ș, Ț/ț). */

@font-face {
  font-family: "Plein";
  src: url("assets/fonts/Plein-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0000-007F,
    U+00A0-024F,
    U+0102-0103,
    U+0218-021B,
    U+1E00-1EFF,
    U+2000-206F,
    U+2070-209F,
    U+20A0-20CF;
}

@font-face {
  font-family: "Plein";
  src: url("assets/fonts/Plein-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0000-007F,
    U+00A0-024F,
    U+0102-0103,
    U+0218-021B,
    U+1E00-1EFF,
    U+2000-206F,
    U+2070-209F,
    U+20A0-20CF;
}

/* --- 3. Design tokens --------------------------------------------------- */

:root {
  /* Color */
  --color-surface: #3B2C65;
  --color-surface-pattern: #4F4174;
  --color-on-surface: #FFFFFF;
  --color-accent: #F37053;
  --color-focus: #FFB199;

  /* Type */
  --font-family-display: "Plein", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-weight-regular: 400;
  --font-weight-bold: 700;

  --font-size-h1: clamp(1.75rem, 1.2rem + 2.5vw, 3rem);
  --font-size-body: 22px;

  --line-height-tight: 1.1;
  --line-height-normal: 1.35;

  /* Space */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 96px;
  --space-9: 122px;

  /* Layout */
  --page-x: clamp(20px, 7.7vw, 133px);
  --page-y: clamp(28px, 6vw, 96px);
  --content-max: 875px;
  --heading-max: 640px;

  color-scheme: dark;
}

/* --- 4. Base ------------------------------------------------------------ */

body {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  gap: clamp(var(--space-6), 8vh, 180px);
  padding-inline: var(--page-x);
  padding-block: var(--page-y);

  background-color: var(--color-surface);
  background-image: url("assets/homepage_background.svg");
  background-repeat: no-repeat;
  background-position: 133px 110px;
  background-size: 80% auto;

  color: var(--color-on-surface);
  font-family: var(--font-family-display);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-body);
  line-height: var(--line-height-normal);

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* --- 5. Components ------------------------------------------------------ */

/* Skip link */
.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.focus-skip:focus,
.focus-skip:focus-visible {
  position: absolute;
  inset-block-start: var(--space-3);
  inset-inline-start: var(--space-3);
  inline-size: auto;
  block-size: auto;
  margin: 0;
  padding: var(--space-2) var(--space-3);
  clip: auto;
  clip-path: none;
  overflow: visible;

  background: var(--color-on-surface);
  color: var(--color-surface);
  font-weight: var(--font-weight-bold);
  border-radius: 4px;
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  z-index: 10;
}

/* Brand lockup (header) */
.site-header {
  display: flex;
  align-items: flex-start;
}

.brand {
  display: inline-flex;
  align-items: flex-end;
  gap: clamp(var(--space-3), 1.2vw, var(--space-4));
  padding-block: var(--space-2);
  border-radius: 4px;
}

.brand:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 4px;
}

.brand__mark {
  inline-size: clamp(36px, 3.2vw, 49px);
  block-size: auto;
}

.brand__wordmarks {
  display: inline-flex;
  flex-direction: column;
  gap: clamp(var(--space-1), 0.3vw, var(--space-2));
}

.brand__wordmark {
  inline-size: clamp(132px, 11vw, 181px);
  block-size: auto;
}

.brand__eyebrow {
  inline-size: clamp(118px, 9.5vw, 163px);
  block-size: auto;
}

/* Hero */
.hero {
  align-self: center;
  max-width: var(--content-max);
}

.hero__title {
  margin: 0 0 clamp(var(--space-6), 7vh, var(--space-9));
  max-width: var(--heading-max);
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  text-wrap: balance;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}

.hero__lede {
  margin: 0 0 var(--space-5);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  text-wrap: pretty;
  overflow-wrap: break-word;
}

.hero__close {
  margin: 0;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-bold);
  text-wrap: pretty;
  overflow-wrap: break-word;
}

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

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(var(--space-4), 4vw, var(--space-8));
  font-size: var(--font-size-body);
}

.contact {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  margin-inline-start: calc(var(--space-2) * -1);
  border-radius: 4px;
  transition: color 160ms ease-out;
}

.contact:hover {
  color: var(--color-accent);
}

.contact:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 4px;
}

.socials {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.socials__link {
  display: inline-grid;
  place-items: center;
  min-inline-size: 44px;
  min-block-size: 44px;
  border-radius: 4px;
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}

.socials__link img {
  inline-size: 24px;
  block-size: 24px;
}

.socials__link:hover {
  transform: translateY(-1px);
  opacity: 1;
}

.socials__link:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.socials__link:not([href]) {
  cursor: default;
  opacity: 0.7;
  pointer-events: none;
}

/* --- 6. Responsive tuning ----------------------------------------------- */

@media (min-width: 768px) {
  /* Align the hero and footer's left edge with the wordmark's "c" — matches
     the Figma offset of icon-width + brand-gap from the page-x padding. */
  .hero,
  .site-footer {
    padding-inline-start: clamp(40px, 4.4vw, 73px);
  }
}

@media (min-width: 1280px) {
  .hero__title {
    white-space: nowrap;
  }
}

/* --- 7. Motion safety --------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
