/* ============================================
   Shiny Nail Polish — stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Archivo:wght@400;500;600&display=swap');

:root {
  --color-primary: #7A2436;
  --color-primary-dark: #4A1520;
  --color-primary-light: #F6E2E0;
  --color-primary-accent: #C9A24B;
  --color-text: #241B1D;
  --color-background: #FBF6F4;
  --line: #EDDAD8;
  --max-width: 1080px;
  --space-sm: 12px;
  --space-md: 24px;
  --space-lg: 48px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: 'Archivo', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; max-width: 62ch; }

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--color-primary-accent);
  outline-offset: 3px;
}

/* ---------- Header & Nav ---------- */

header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  text-align: left;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0rem;
    flex-shrink: 0;
position: relative;
}

header h1 {
    margin: 0;
}

.site-logo {
    width: 240px;
    max-width: 240px;
    height: auto;
    display: block;
}

.header-visual {
    width: 179px;
    height: 150px;
    flex-shrink: 0;
    position: absolute;
    top: 50%;
   right: -40px;
    transform: translateY(-50%);
    z-index: 2;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  border: none;
  padding: 0;
}

nav a {
  color: var(--color-text);
  font-size: 0.92rem;
  font-weight: 500;
}

/* Hamburger button - hidden on desktop, shown on mobile via media query below */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
    flex-shrink: 0;
    min-width: 28px;
}

.nav-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
}

.nav-overlay.active {
    display: block;
}

/* ---------- Mobile nav (single source of truth: #site-nav) ---------- */
@media (max-width: 768px) {
   header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

header h1 {
    margin: 0 auto;
    flex-shrink: 0;
    width: fit-content;
}
.header-visual {
    position: absolute;
    right: -1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    height: 160px;
}
.nav-toggle {
    display: flex;
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
}

    .site-logo {
    width: 300px;
    max-width: 400px;
    height: auto;
    flex-shrink: 0;
margin: 0 auto;
 margin-left: 0;
display: block;
}

    #site-nav {
        position: fixed;
        top: 0;
        left: -260px;
        width: 260px;
        height: 100vh;
        background: var(--color-background);
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 0;
        border: none;
        padding: 5rem 1.5rem 1.5rem;
        transition: left 0.3s ease, box-shadow 0.3s ease;
        z-index: 1000;
    }

    #site-nav.open {
        left: 0;
        box-shadow: 2px 0 12px rgba(0,0,0,0.15);
    }

    #site-nav a {
        padding: 0.85rem 0;
        border-bottom: 1px solid var(--line);
        margin: 0;
        display: block;
    }
}

footer nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    border: none;
    padding: 0;
}

footer nav a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 14px;
}

footer nav a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.footer-copyright {
    margin-top: var(--space-sm);
    font-size: 13px;
    color: #777;
}

/* ---------- Hero ---------- */

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 5rem 1.5rem 4rem;
}

.hero h2 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  max-width: 14ch;

  /* the glossy sheen: a bright band swept across the text via
     background-clip, animated left-to-right on a loop */
  background: linear-gradient(
    100deg,
    var(--color-text) 40%,
    var(--color-primary) 48%,
    var(--color-primary-accent) 50%,
    var(--color-primary) 52%,
    var(--color-text) 60%
  );
  background-size: 300% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 6s ease-in-out infinite;
}

@keyframes sheen {
  0%   { background-position: 120% 0; }
  45%  { background-position: -20% 0; }
  100% { background-position: -20% 0; }
}

.hero p {
  font-size: 1.05rem;
  max-width: 48ch;
  color: #4A3D42;
}

.button {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.85rem 1.6rem;
  border-radius: 3px;
  background: var(--color-primary);
  color: var(--color-background);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: filter 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .button:hover {
    text-decoration: none;
    filter: brightness(1.2);
  }
  nav a:hover {
    color: var(--color-primary);
    text-decoration: none;
  }
}

@media (hover: none) {
  .button:active {
    text-decoration: none;
    transform: scale(0.97);
  }
  nav a:active {
    color: var(--color-primary);
    background: var(--color-primary-light);
  }
}

/* same sheen idea, reused as a light sweep across the button */
.button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(255,255,255,0.35) 48%,
    rgba(255,255,255,0.35) 52%,
    transparent 70%
  );
  background-size: 300% 100%;
  background-position: 120% 0;
  animation: sheen-btn 6s ease-in-out infinite;
  z-index: -1;
}

@keyframes sheen-btn {
  0%   { background-position: 160% 0; }
  45%  { background-position: -60% 0; }
  100% { background-position: -60% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero h2, .button::after { animation: none; }
  .hero h2 { background-position: 0 0; }
}

/* ---------- Main content ---------- */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main > section:not(.hero) {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}

main > section h2 {
  font-size: 1.6rem;
  margin-bottom: 1.75rem;
}

/* ---------- Article "swatch" cards ---------- */

article {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

article:first-of-type { border-top: none; padding-top: 0; }

/* the swatch chip — like a polish color dab beside the text.
   rotates through the three accents via nth-of-type */
article::before {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 0.4rem;
  border-radius: 50%;
  background: var(--color-primary);
}

article:nth-of-type(2)::before { background: var(--color-primary-dark); }
article:nth-of-type(3n)::before { background: var(--color-primary-accent); }

article h3 {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

article p { margin-bottom: 0.5rem; }

article a {
  font-size: 0.92rem;
  font-weight: 500;
}

/* ---------- Footer ---------- */

footer {
    text-align: center;
    padding: var(--space-lg);
    border-top: 1px solid var(--line);
}
.footer-icons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.footer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--color-primary);
  transition: background 0.2s ease, color 0.2s ease;
}

.footer-icon svg {
  width: 18px;
  height: 18px;
}

.footer-icon:hover {
  background: var(--color-primary);
  color: var(--color-background);
  text-decoration: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  header, .hero, main, footer { padding-left: 1.1rem; padding-right: 1.1rem; }
  .hero { padding-top: 3rem; padding-bottom: 2.5rem; }
}
::view-transition-old(root) {
    animation: fade-out 0.25s ease-out;
}

::view-transition-new(root) {
    animation: fade-in 0.25s ease-out;
}

@keyframes fade-out {
    to { opacity: 0; transform: translateY(-8px); }
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(8px); }
}

/* ============================================
   Article page styles (hero, TOC, fix callouts)
   — uses the site's existing color variables so it
   always matches the current palette automatically
   ============================================ */

.article-hero {
    position: relative;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    height: clamp(200px, 26vw, 340px);
    border-radius: 6px;
    overflow: hidden;
    isolation: isolate;
}

.article-hero__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.article-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        100deg,
        rgba(0, 0, 0, 0.72) 0%,
        rgba(0, 0, 0, 0.55) 22%,
        rgba(0, 0, 0, 0.2) 45%,
        rgba(0, 0, 0, 0) 62%
    );
}

.article-hero__content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(16px, 3vw, 40px);
    max-width: 60%;
}

.article-hero__rule {
    width: 40px;
    height: 2px;
    background: var(--color-primary-accent);
    margin-bottom: 14px;
}

.article-hero__title {
    font-size: clamp(1.3rem, 3.2vw, 2.1rem);
    line-height: 1.15;
    color: #fff;
    margin: 0 0 10px 0;
}

.article-hero__subtitle {
    font-size: clamp(0.82rem, 1.2vw, 1rem);
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.88);
    margin: 0;
    max-width: 38ch;
}

@media (max-width: 640px) {
   @media (max-width: 640px) {
    .article-hero {
        height: 240px;
        border-radius: 0;
    }
    .article-hero__content {
        max-width: 100%;
        padding: 18px;
    }
    .article-hero__overlay {
        background: linear-gradient(
            180deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.55) 45%,
            rgba(0, 0, 0, 0.9) 100%
        );
    }
}

/* ---------- Article body ---------- */

.article {
    max-width: 680px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md) 80px;
    color: var(--color-text);
    font-family: 'Work Sans', sans-serif;
}
.byline {
    font-size: 0.88rem;
    color: #77696c;
    margin-bottom: var(--space-md);
}

.byline a {
    color: var(--color-primary);
}

.lede {
    font-size: 1.12rem;
    margin-bottom: 20px;
}

.article__image {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 20px;
    display: block;
}

.article ul {
    margin: 0 0 20px 0;
    padding-left: 1.3em;
}

.article li {
    margin-bottom: 10px;
}

.article strong {
    color: var(--color-primary);
    font-weight: 600;
}

.article-nav-back {
    margin-top: 40px;
    font-size: 0.95rem;
}

/* Jump-to navigation box */
.toc {
    background: var(--color-primary-light);
    border: 1px solid var(--line);
    border-left: 3px solid var(--color-primary-accent);
    border-radius: 6px;
    padding: 20px 24px;
    margin: 28px 0 36px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.toc__label {
    font-family: var(--font-heading, inherit);
    font-style: italic;
    font-size: 1rem;
    margin: 0 0 10px 0;
    color: var(--color-primary);
}
.toc ul {
    margin: 0;
    padding-left: 1.1em;
}

.toc li {
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.toc a {
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 1px solid rgba(0,0,0,0.2);
}

.toc a:hover {
    border-bottom-color: var(--color-primary);
}

/* Quick-fix callout box */
.fix {
    background: var(--color-primary-light);
    border-radius: 4px;
    padding: 18px 22px;
    margin: 4px 0 28px;
}

.fix p {
    margin: 0;
}

.fix__label {
    display: block;
    font-style: italic;
    color: var(--color-primary);
    margin-bottom: 6px;
    font-size: 0.95rem;
}
