@font-face {
  font-family: "Archivo PF";
  src: url("../fonts/archivo-pf.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

@layer reset, tokens, base, layout, components, motion;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body, h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
  ul, ol { padding: 0; }
  img { display: block; max-width: 100%; }
  button, input, select, textarea { font: inherit; }
}

@layer tokens {
  :root {
    --ink: #101010;
    --paper: #f2efe7;
    --paper-2: #e7e2d8;
    --red: #e12631;
    --white: #fffdf7;
    --muted: #615e58;
    --line: 1px solid var(--ink);
    --display: "Archivo PF", "Arial Narrow", Arial, sans-serif;
    --text: "Archivo PF", Arial, sans-serif;
    --shell: 96rem;
    --gutter: clamp(1.1rem, 3vw, 3.2rem);
    --section: clamp(5rem, 9vw, 9rem);
    --ease: cubic-bezier(.2, .8, .2, 1);
  }
}

@layer base {
  html { background: var(--paper); color: var(--ink); }
  body {
    min-width: 20rem;
    overflow-x: clip;
    font-family: var(--text);
    font-size: clamp(1rem, .95rem + .15vw, 1.12rem);
    line-height: 1.48;
    text-rendering: optimizeLegibility;
  }
  a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .18em; }
  button, summary { color: inherit; }
  h1, h2, h3 {
    font-family: var(--display);
    font-weight: 780;
    font-stretch: 75%;
    line-height: .92;
    letter-spacing: -.055em;
  }
  h1 { font-size: clamp(4.5rem, 11vw, 11rem); }
  h2 { font-size: clamp(3rem, 6.2vw, 7rem); }
  h3 { font-size: clamp(1.7rem, 3vw, 3.4rem); }
  p { max-width: 62ch; }
  ::selection { background: var(--red); color: var(--white); }
  :focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
}

@layer layout {
  .shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }
  .section { padding-block: var(--section); }
  .bg-ink { background: var(--ink); color: var(--paper); }
  .bg-red { background: var(--paper-2); color: var(--ink); }
}

@layer components {
  .skip-link {
    position: fixed;
    z-index: 100;
    inset: 1rem auto auto 1rem;
    padding: .7rem 1rem;
    background: var(--ink);
    color: var(--white);
    transform: translateY(-180%);
  }
  .skip-link:focus { transform: none; }

  .eyebrow {
    font-size: .77rem;
    font-weight: 750;
    letter-spacing: .16em;
    line-height: 1.25;
    text-transform: uppercase;
  }
  .lede { font-size: clamp(1.3rem, 1.8vw, 2rem); line-height: 1.2; letter-spacing: -.025em; }
  .muted { color: var(--muted); }
  .flow-space { margin-top: 1.5rem; }

  .site-header { z-index: 20; border-bottom: var(--line); background: rgba(242, 239, 231, .97); }
  .header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2rem; }
  .brand { display: inline-flex; width: max-content; align-items: center; gap: .7rem; text-decoration: none; }
  .brand-logo { object-fit: contain; }
  .brand-name { font-stretch: 75%; }
  .desktop-nav ul, .footer-nav { display: flex; align-items: center; list-style: none; gap: clamp(1.15rem, 2.2vw, 2.4rem); }
  .site-nav a { position: relative; display: block; padding-block: .7rem; text-decoration: none; font-size: .92rem; font-weight: 570; }
  .site-nav a::after { content: ""; position: absolute; inset: auto 0 .4rem; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: right; transition: transform 220ms var(--ease); }
  .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
  .header-cta { justify-self: end; display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; font-size: .84rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
  .header-cta::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--red); }
  .mobile-nav { display: none; }

  .button-row { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }
  .button {
    display: inline-flex;
    min-height: 3.25rem;
    align-items: center;
    justify-content: center;
    padding: .75rem 1.15rem;
    border: var(--line);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 720;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
  .button--solid { background: var(--ink); color: var(--paper); }
  .button--services { min-width: 12.5rem; justify-content: space-between; background: transparent; color: var(--ink); }
  .button--services::after { content: "↗"; margin-left: 1.5rem; font-size: 1.15em; line-height: 1; }
  .button--light { border-color: var(--paper); color: var(--paper); }
  .arrow-link { display: inline-flex; align-items: center; gap: .8rem; font-weight: 700; text-decoration: none; }
  .arrow-link span { font-size: 1.45em; line-height: 1; }

  .page-hero { min-height: clamp(32rem, 72svh, 48rem); display: grid; align-items: end; border-bottom: var(--line); }
  .page-hero-inner { padding-block: clamp(4rem, 8vw, 8rem) clamp(3rem, 6vw, 6rem); }
  .page-hero .eyebrow { margin-bottom: clamp(1.5rem, 3vw, 3rem); }
  .page-hero-copy { display: grid; grid-template-columns: 1.25fr .75fr; gap: var(--gutter); align-items: end; margin-top: clamp(2rem, 5vw, 5rem); }
  .page-hero-copy > *:last-child { justify-self: end; max-width: 27rem; }

  .index-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; }
  .index-title .index { padding-top: .6rem; font-size: .8rem; font-weight: 750; letter-spacing: .15em; }

  .tag-list { display: flex; flex-wrap: wrap; list-style: none; gap: .45rem; margin-top: 1.5rem; }
  .tag-list li { padding: .42rem .65rem; border: 1px solid currentColor; font-size: .73rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }

  .site-footer { position: relative; overflow: hidden; border-top: .65rem solid var(--red); background: var(--ink); color: var(--paper); }
  .footer-inner { position: relative; padding-block: clamp(4rem, 8vw, 8rem) 2rem; }
  .footer-top { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(3rem, 8vw, 9rem); align-items: end; padding-bottom: clamp(4rem, 8vw, 8rem); }
  .footer-title { max-width: 8ch; font-size: clamp(4.5rem, 10vw, 10rem); color: var(--paper); }
  .footer-contact { justify-self: end; width: min(100%, 27rem); }
  .footer-contact .lede { margin-bottom: 2rem; }
  .footer-nav { margin-bottom: 2rem; }
  .footer-nav a { text-decoration: none; }
  .footer-social { display: flex; flex-wrap: wrap; list-style: none; gap: .5rem; }
  .footer-social a { display: grid; width: 2.8rem; height: 2.8rem; place-items: center; border: 1px solid #5a5a5a; border-radius: 50%; }
  .footer-social img { width: 1.1rem; height: 1.1rem; object-fit: contain; transition: filter 180ms; }
  .footer-meta { display: grid; grid-template-columns: 1fr auto; gap: 2rem; padding-top: 1.2rem; border-top: 1px solid #505050; font-size: .78rem; color: #b9b6af; }

  .contact-strip { border-top: var(--line); }
  .contact-strip a { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; padding-block: clamp(2rem, 4vw, 4rem); text-decoration: none; }
  .contact-strip strong { font: 780 clamp(2.5rem, 6vw, 6.5rem)/.9 var(--display); font-stretch: 75%; letter-spacing: -.055em; }
  .contact-strip span { font-size: clamp(2rem, 4vw, 4rem); }
}

@layer motion {
  @media (hover: hover) and (pointer: fine) {
    .site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
    .button, .arrow-link, .contact-strip a { transition: color 180ms, background-color 180ms, border-color 180ms; }
    .button:hover { background: var(--red); color: var(--white); border-color: var(--red); }
    .button--light:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
    .arrow-link:hover { color: var(--red); }
    .contact-strip a:hover { background: var(--red); color: var(--white); }
    .footer-social a { transition: background-color 180ms, border-color 180ms, transform 180ms; }
    .footer-social a:hover { background: var(--white); border-color: var(--red); transform: translateY(-3px); }
    .footer-social a:hover img { filter: brightness(0); }
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  }
}

@media (max-width: 56rem) {
  .page-hero-copy, .footer-top { grid-template-columns: 1fr; }
  .header-inner { grid-template-columns: 1fr auto; }
  .desktop-nav, .header-cta { display: none; }
  .mobile-nav { display: block; justify-self: end; }
  .mobile-nav summary { cursor: pointer; list-style: none; padding: .8rem 0; font-size: .78rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
  .mobile-nav summary::-webkit-details-marker { display: none; }
  .mobile-nav[open] nav { position: absolute; inset: calc(100% + 1px) 0 auto; padding: 1rem var(--gutter) 1.5rem; border-bottom: var(--line); background: var(--paper); }
  .mobile-nav ul { list-style: none; }
  .mobile-nav a { padding-block: .75rem; font-size: 1.2rem; }
  .page-hero { min-height: auto; }
  .page-hero-copy > *:last-child, .footer-contact { justify-self: start; }
  .footer-meta { grid-template-columns: 1fr; gap: .5rem; }
}

@media (max-width: 38rem) {
  h1 { font-size: clamp(4rem, 20vw, 6.8rem); }
  h2 { font-size: clamp(2.8rem, 14vw, 4.5rem); }
  .brand-name { font-size: .92rem; }
  .site-header { background: var(--paper); }
  .footer-title { font-size: clamp(4rem, 19vw, 6.5rem); }
  .contact-strip a { grid-template-columns: 1fr; gap: 1rem; }
}

@media (min-width: 64rem) {
  .footer-inner::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 46%;
    left: 50%;
    width: clamp(24rem, 38vw, 40rem);
    aspect-ratio: 835 / 704;
    background: url("../images/brand/pfxamd-graphic-designer-logo-dark-background.svg") center / contain no-repeat;
    opacity: .045;
    transform: translate(-50%, -50%);
    pointer-events: none;
  }
  .footer-top, .footer-meta { position: relative; z-index: 1; }
}

/* Shared header and full-screen mobile navigation */
a, button, summary { touch-action: manipulation; }
.site-header { position: sticky; top: 0; }
.header-inner { min-height: 4.85rem; }
.brand-logo { width: auto; height: 3.35rem; padding: 0; background: transparent; }
.brand-name { font-size: 1.02rem; font-weight: 790; letter-spacing: -.045em; }

@media (max-width: 56rem) {
  body.mobile-menu-open { overflow: hidden; }

  .site-header,
  .site-header .brand,
  .mobile-nav summary {
    transition: color 220ms var(--ease), background-color 220ms var(--ease), border-color 220ms var(--ease);
  }

  .site-header:has(.mobile-nav[open]) {
    background: var(--ink);
    color: var(--paper);
    border-bottom-color: #383838;
  }

  .site-header:has(.mobile-nav[open]) .brand,
  .site-header:has(.mobile-nav[open]) .mobile-nav summary {
    position: relative;
    z-index: 42;
  }

  .site-header:has(.mobile-nav[open]) .brand-logo {
    content: url("../images/brand/pfxamd-graphic-designer-logo-dark-background.svg");
  }

  .mobile-nav summary { display: inline-flex; align-items: center; gap: .7rem; }
  .mobile-nav summary::after {
    content: "+";
    display: grid;
    width: 1.5rem;
    height: 1.5rem;
    place-items: center;
    border: 1px solid currentColor;
    font-size: 1rem;
    line-height: 1;
  }

  .mobile-nav[open] summary::after {
    content: "×";
    border-color: var(--red);
    background: var(--red);
    color: var(--white);
  }

  .mobile-nav[open] nav {
    position: fixed;
    z-index: 40;
    inset: 4.85rem 0 0;
    display: grid;
    grid-template-rows: 1fr auto;
    overflow-y: auto;
    padding: clamp(2rem, 6svh, 4.5rem) var(--gutter) 1.4rem;
    border: 0;
    background: var(--ink);
    color: var(--paper);
    animation: mobile-menu-in 300ms var(--ease) both;
  }

  .mobile-nav ul {
    width: 100%;
    align-self: center;
    counter-reset: mobile-nav;
  }

  .mobile-nav li {
    counter-increment: mobile-nav;
    border-top: 1px solid #383838;
  }
  .mobile-nav li:last-child { border-bottom: 1px solid #383838; }

  .mobile-nav a {
    display: grid;
    grid-template-columns: 2.35rem minmax(0, 1fr) auto;
    gap: .7rem;
    align-items: center;
    padding-block: .36em;
    color: var(--paper);
    font-family: var(--display);
    font-size: clamp(3.2rem, 10.5vw, 6rem);
    font-stretch: 75%;
    font-weight: 780;
    letter-spacing: -.055em;
    line-height: .86;
  }

  .mobile-nav a::before {
    content: "0" counter(mobile-nav);
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent !important;
    color: #77736d;
    font-family: var(--text);
    font-size: .7rem;
    font-stretch: 100%;
    font-weight: 700;
    letter-spacing: .12em;
  }

  .mobile-nav a::after {
    content: "";
    position: static;
    width: .55rem;
    height: .55rem;
    background: transparent;
    transform: none;
  }

  .mobile-nav a[aria-current="page"] { color: var(--red); }
  .mobile-nav a[aria-current="page"]::before { color: var(--red); }
  .mobile-nav a[aria-current="page"]::after { background: var(--red); }

  .mobile-nav nav::after {
    content: "INDEPENDENT GRAPHIC DESIGNER  ·  TETOUAN / MOROCCO";
    padding-top: 1.15rem;
    border-top: 1px solid #383838;
    color: #9a9690;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .14em;
    line-height: 1.5;
  }
}

@media (max-width: 38rem) {
  .brand-logo { height: 3rem; }
  .header-inner { min-height: 4.35rem; }
  .mobile-nav[open] nav { inset-block-start: 4.35rem; }
  .mobile-nav a { font-size: clamp(3.15rem, 15vw, 5rem); }
}

@keyframes mobile-menu-in {
  from { opacity: 0; transform: translateY(-.75rem); }
  to { opacity: 1; transform: translateY(0); }
}
