/* ==========================================================================
   Shear Performance Hair Salon — styles.css
   Art Deco single-page site. Black and white only; photographs carry the color.
   ========================================================================== */

/* ---------- Fonts (self-hosted, no external requests) ---------- */

@font-face {
  font-family: "Limelight";
  src: url("assets/fonts/limelight.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poiret One";
  src: url("assets/fonts/poiret-one.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Josefin Sans";
  src: url("assets/fonts/josefin-300.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Josefin Sans";
  src: url("assets/fonts/josefin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Josefin Sans";
  src: url("assets/fonts/josefin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  --ink: #111111;
  --ink-deep: #0A0A0A;
  --paper: #FFFFFF;
  --paper-alt: #FFFFFF;
  --ink-soft: rgba(17, 17, 17, 0.64);

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 96px;
  --s10: 128px;

  --font-display: "Limelight", "Georgia", serif;
  --font-accent: "Poiret One", "Georgia", serif;
  --font-body: "Josefin Sans", "Helvetica Neue", Arial, sans-serif;

  --nav-h: 56px;
  --gutter: var(--s5);
  --sec-pad: var(--s8);
  --rule-w: 180px;
}

@media (min-width: 768px) {
  :root {
    --nav-h: 64px;
    --gutter: var(--s7);
    --sec-pad: var(--s9);
    --rule-w: 260px;
  }
}

@media (min-width: 1280px) {
  :root {
    --nav-h: 72px;
    --gutter: var(--s8);
    --sec-pad: var(--s10);
    --rule-w: 320px;
  }
}

/* ---------- Reset / base ---------- */

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

html { -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: clip;
}

img { max-width: 100%; }

h1, h2, h3, p, ul, figure { margin: 0; }

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

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

section { scroll-margin-top: var(--nav-h); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

/* ---------- Typography primitives ---------- */

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 26px;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  line-height: 1.25;
  text-align: center;
  margin-bottom: var(--s7);
}

@media (min-width: 768px) {
  .section-title { font-size: 32px; }
  .section-title--left { text-align: left; text-indent: 0; }
}

@media (min-width: 1280px) {
  .section-title { font-size: 38px; }
}

.body {
  font-weight: 300;
  font-size: 16px;
  letter-spacing: 0.02em;
  line-height: 1.7;
  max-width: 680px;
}

.body + .body { margin-top: var(--s5); }

@media (min-width: 768px) { .body { font-size: 17px; } }
@media (min-width: 1280px) { .body { font-size: 18px; } }

.caption {
  font-family: var(--font-accent);
  font-size: 14px;
  letter-spacing: 0.06em;
  line-height: 1.5;
  color: var(--ink-soft);
  text-align: center;
  margin-top: var(--s3);
}

@media (min-width: 768px) { .caption { font-size: 15px; } }

/* Links inside body copy */
.card__link a,
.visit__contact a {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.card__link a:hover,
.visit__contact a:hover { text-decoration-thickness: 2px; }

/* ---------- Sticky nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--nav-h);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--ink);
}

.nav__inner {
  min-height: var(--nav-h);
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--s2) var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2) var(--s4);
}

.nav__mark {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.16em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transform: translateY(-1px);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--s5);
}

.nav__links a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: var(--s3) 0;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.20em;
  text-indent: 0.20em;
  line-height: 1;
  text-decoration: none;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 8px;
  height: 2px;
  width: 0;
  background: var(--ink);
  transition: width 200ms ease;
}

.nav__links a:hover::after,
.nav__links a:focus-visible::after,
.nav__links a.is-active::after { width: 100%; }

@media (max-width: 419px) {
  .nav__mark { font-size: 11px; letter-spacing: 0.12em; }
  .nav__links { gap: var(--s4); }
  .nav__links a { font-size: 11px; letter-spacing: 0.16em; text-indent: 0.16em; }
}

@media (max-width: 359px) {
  .nav__mark { font-size: 10px; letter-spacing: 0.08em; }
  .nav__links { gap: var(--s3); }
  .nav__links a { font-size: 10px; letter-spacing: 0.12em; text-indent: 0.12em; }
}

@media (min-width: 768px) {
  .nav__links { gap: var(--s7); }
}

@media (min-width: 1280px) {
  .nav__links a { font-size: 13px; }
}

/* ---------- Deco frame (double rule) ---------- */

.deco-frame {
  --frame-w: 3px;
  --frame-gap: 6px;
  position: relative;
  border: var(--frame-w) solid var(--ink);
  padding: var(--s5);
  background: transparent;
}

.deco-frame::before {
  content: "";
  position: absolute;
  inset: var(--frame-gap);
  border: 1px solid var(--ink);
  pointer-events: none;
}

@media (min-width: 768px) {
  .deco-frame { --frame-w: 4px; --frame-gap: 8px; padding: var(--s6); }
}

@media (min-width: 1280px) {
  .deco-frame { --frame-w: 5px; --frame-gap: 10px; padding: var(--s7); }
}

/* ---------- Stepped zigzag corner motif ---------- */

.zig {
  position: absolute;
  color: var(--ink);
  pointer-events: none;
  width: 58px;
  height: auto;
}

.zig--bl {
  left: calc(var(--frame-w) / -2);
  bottom: -31px;
}

.zig--br {
  right: calc(var(--frame-w) / -2);
  bottom: -31px;
  transform: scaleX(-1);
}

@media (min-width: 768px) {
  .zig { width: 77px; }
  .zig--bl, .zig--br { bottom: -41px; }
}

@media (min-width: 1280px) {
  .zig { width: 96px; }
  .zig--bl, .zig--br { bottom: -52px; }
}

/* ---------- Thin deco rule ---------- */

.deco-rule {
  position: relative;
  width: var(--rule-w);
  height: 9px;
  margin: var(--s6) auto;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 4px / 100% 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 8px / 100% 2px no-repeat;
}

.deco-rule::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  background: var(--ink);
  transform: translate(-50%, -50%) rotate(45deg);
  outline: 4px solid var(--paper);
}

/* ---------- Photo frame ---------- */

.photo {
  position: relative;
  display: block;
  padding: 8px;
  background: var(--paper);
  border: 3px solid var(--ink);
}

.photo::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--ink);
  pointer-events: none;
}

.photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 768px) {
  .photo { padding: 10px; }
  .photo::after { inset: 6px; }
}

@media (min-width: 1280px) {
  .photo { padding: 12px; border-width: 4px; }
  .photo::after { inset: 7px; }
}

.photo--4x5 { aspect-ratio: 4 / 5; }
.photo--3x4 { aspect-ratio: 3 / 4; }
.photo--working { aspect-ratio: 4 / 5; }

@media (min-width: 768px) {
  .photo--working { aspect-ratio: 16 / 9; }
}

/* ---------- Hero ---------- */

.hero {
  background: var(--paper);
  padding: calc(var(--sec-pad) + var(--nav-h)) var(--gutter) var(--sec-pad);
  overflow-x: clip;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__frame {
  width: 100%;
  max-width: 320px;
}

.hero__logo {
  display: block;
  width: 100%;
  height: auto;
}

.hero__line {
  font-family: var(--font-accent);
  font-size: 17px;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-align: center;
  max-width: 300px;
}

@media (min-width: 768px) {
  .hero__frame { max-width: 560px; }
  .hero__line { font-size: 21px; max-width: 460px; }
}

@media (min-width: 1280px) {
  .hero {
    min-height: calc(100vh - var(--nav-h));
    display: flex;
    align-items: center;
    padding-top: var(--sec-pad);
  }
  .hero__frame { max-width: 720px; }
  .hero__line { font-size: 24px; max-width: 560px; }
}

/* ---------- About ---------- */

.about {
  background: var(--paper-alt);
  border-top: 2px solid var(--ink);
  padding: var(--sec-pad) var(--gutter);
}

.about__grid { display: block; }

.about__portrait { margin-bottom: var(--s7); }

.about__wide { margin-top: var(--s7); }

@media (min-width: 768px) {
  .about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s7);
    align-items: center;
  }
  .about__portrait { margin-bottom: 0; }
}

@media (min-width: 1280px) {
  .about__grid {
    grid-template-columns: 5fr 6fr;
    gap: var(--s8);
  }
  .about__copy .body { max-width: 560px; }
}

/* ---------- Services ---------- */

.services {
  background: var(--paper);
  border-top: 2px solid var(--ink);
  padding: var(--sec-pad) var(--gutter);
}

.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s6);
  align-items: start;
}

@media (min-width: 768px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); gap: var(--s7); }
}

@media (min-width: 1280px) {
  .services__grid { grid-template-columns: repeat(3, 1fr); gap: var(--s7) var(--s8); }
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.icon-box {
  position: relative;
  width: 96px;
  height: 96px;
  background: #FFFFFF;
  border: 2px solid var(--ink);
  margin-bottom: var(--s5);
}

.icon-box::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--ink);
  pointer-events: none;
}

.icon-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

@media (min-width: 768px) { .icon-box { width: 112px; height: 112px; } }
@media (min-width: 1280px) { .icon-box { width: 120px; height: 120px; } }

.card__name {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  line-height: 1.4;
}

@media (min-width: 768px) { .card__name { font-size: 16px; } }
@media (min-width: 1280px) { .card__name { font-size: 17px; } }

.card__desc {
  margin-top: var(--s3);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.02em;
  line-height: 1.6;
  max-width: 260px;
}

@media (min-width: 1280px) { .card__desc { font-size: 16px; } }

.card__link {
  margin-top: var(--s3);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- Visit ---------- */

.visit {
  background: var(--paper-alt);
  border-top: 2px solid var(--ink);
  padding: var(--sec-pad) var(--gutter);
  overflow-x: clip;
}

.visit__grid { display: block; text-align: center; }

.visit__figure { margin-top: var(--s7); }

.visit__address {
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.03em;
  line-height: 1.7;
  max-width: 420px;
  margin: 0 auto;
}

.visit__contact {
  margin-top: var(--s5);
  font-size: 18px;
  line-height: 1.5;
}

.visit__contact--tight { margin-top: var(--s3); }

.visit__contact a {
  display: inline-block;
  min-height: 44px;
  padding: var(--s2) 0;
  font-weight: 600;
  letter-spacing: 0.04em;
  overflow-wrap: break-word;
}

.visit__hours {
  margin-top: var(--s5);
  font-family: var(--font-accent);
  font-size: 16px;
  letter-spacing: 0.06em;
  line-height: 1.5;
}

/* Clear the zigzag ornaments hanging below the card (31/41/52px per breakpoint), and center the button under it */
.visit__cta { margin-top: calc(31px + var(--s5)); text-align: center; }

@media (min-width: 768px) {
  .visit__cta { margin-top: calc(41px + var(--s5)); }
}

@media (min-width: 1280px) {
  .visit__cta { margin-top: calc(52px + var(--s5)); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 2px solid var(--ink);
  padding: var(--s3) var(--s6);
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.20em;
  text-indent: 0.20em;
  line-height: 1;
  text-decoration: none;
  background: transparent;
  transition: background-color 160ms ease, color 160ms ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

@media (min-width: 768px) {
  .visit__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s7);
    align-items: center;
    text-align: left;
  }
  .visit__figure { margin-top: 0; }
  .visit__address { margin: 0; }
  .visit__contact { font-size: 20px; }
  .visit__contact--tight { font-size: 17px; }
  .visit__hours { font-size: 17px; }
}

@media (min-width: 1280px) {
  .visit__grid { grid-template-columns: 6fr 5fr; gap: var(--s8); }
  .visit__address { font-size: 18px; }
  .visit__contact { font-size: 22px; }
  .visit__hours { font-size: 18px; }
}

/* ---------- Footer ---------- */

.footer { background: var(--paper); }

.footer__banner {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.footer__banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 768px) {
  .footer__banner { aspect-ratio: 21 / 9; }
}

.footer-zag {
  height: 12px;
  background: var(--ink-deep);
  clip-path: polygon(
    0 100%, 0 50%, 12.5% 50%, 12.5% 0, 25% 0, 25% 50%, 37.5% 50%, 37.5% 100%,
    50% 100%, 50% 50%, 62.5% 50%, 62.5% 0, 75% 0, 75% 50%, 87.5% 50%, 87.5% 100%,
    100% 100%
  );
}

@media (min-width: 768px) { .footer-zag { height: 18px; } }

.footer__bar {
  background: var(--ink-deep);
  color: var(--paper);
  padding: var(--s7) var(--gutter);
  text-align: center;
}

.footer__name {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  line-height: 1.5;
}

@media (min-width: 768px) { .footer__name { font-size: 16px; } }

.footer__copy {
  margin-top: var(--s4);
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.05em;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
}

.footer :focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

/* ---------- Scroll reveal ---------- */

/* The hiding half is scoped to .js, which is set by an inline script in <head>.
   With JavaScript disabled the class is never added, so every .reveal element
   renders normally and only the animation is lost. */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 600ms cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .nav__links a::after { transition: none; }
  .btn { transition: none; }
}
