/*
Theme Name: Aria
Theme URI: https://knotful.com/themes/aria
Author: Knotful & Co. Ltd
Author URI: https://knotful.com
Description: Aria is a light, image-forward wedding-photography theme with an editorial feel, a built-in light and dark mode, and a companion-plugin architecture. Ships in dark mode by default; colors and the palette picker come from Knotful Companion.
Version: 00.04.04
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aria
*/


  /*
   Colors, type, spacing and every other value come from Knotful Companion's
   design tokens (--kn-*), so the theme follows whichever palette and mode the
   visitor picks. Aria defines none of its own: see Companion's docs/TOKENS.html.
   The few sizes below that are Aria's own layout (hero heights, grid
   proportions) stay here; colors never do.
  */

  * { box-sizing: border-box; }

  html { scroll-behavior: smooth; }

  body {
    margin: 0;
    background: var(--kn-bg);
    color: var(--kn-text);
    font-family: var(--kn-font-body);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  /* A page shorter than the window keeps its footer at the bottom: the
     content takes up the slack, so no page color shows under the footer
     (owner, 7 November 2026). Taller pages are unaffected. 100svh is the
     window with a phone's address bar showing, so a short page never
     scrolls by the bar's height; 100vh is for browsers before 2022. */
  @media screen {
    body {
      display: flex;
      flex-direction: column;
      min-height: 100vh;
      min-height: 100svh;
    }
    #content { flex: 1 0 auto; }
    body > footer { flex-shrink: 0; }

    /* A plugin's tracking pixel printed straight into the page would
       otherwise be stretched across it. */
    body > img { align-self: flex-start; }

    /* Signed in, WordPress moves the page down by its admin bar. */
    body.admin-bar { min-height: calc(100vh - 32px); min-height: calc(100svh - 32px); }
  }
  @media screen and (max-width: 782px) {
    body.admin-bar { min-height: calc(100vh - 46px); min-height: calc(100svh - 46px); }
  }

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

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

  ::selection { background: var(--kn-selection); color: var(--kn-on-selection); }

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

  .eyebrow {
    font-family: var(--kn-font-body);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--kn-tint);
    margin: 0 0 18px;
  }

  .display {
    font-family: var(--kn-font-display);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: 0.005em;
    margin: 0;
  }

  /* ---- Top bar ---- */
  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px var(--kn-edge);
    background: var(--kn-bar);
    backdrop-filter: saturate(120%) blur(8px);
    border-bottom: 1px solid var(--kn-line);
  }

  /* ---- Logo + theme toggle ---- */
  .logo { display: inline-flex; align-items: center; gap: 11px; background: none; border: 0; cursor: pointer; padding: 0; }
  .logo-mark { width: 46px; height: 46px; flex: none; }
  .logo-mark svg { display: block; width: 100%; height: 100%; }
  .logo-mark .ring { stroke: var(--kn-tint); opacity: 0.55; }
  .logo-mark .leaf { stroke: var(--kn-tint); }
  .logo-mark .glyph { stroke: var(--kn-text); }
  .logo-mark .seed { fill: var(--kn-metal); }
  .logo-word { font-family: var(--kn-font-display); font-weight: 500; font-size: 27px; letter-spacing: 0.2em; padding-left: 0.2em; color: var(--kn-text); }
  .logo--on-color .ring { stroke: currentColor; opacity: 0.6; }
  .logo--on-color .leaf,
  .logo--on-color .glyph { stroke: currentColor; }
  .logo--on-color .logo-word { color: currentColor; }

  .bar-right { display: flex; align-items: center; gap: clamp(18px, 3vw, 34px); }
  /* The picker (palettes plus light and dark) is Companion's — the same
     control on every product. Only its placement in this header belongs here. */
  .topbar .kn-look-btn { opacity: 0.82; transition: opacity var(--kn-speed) var(--kn-ease), border-color var(--kn-speed-fast) var(--kn-ease); }
  .topbar .kn-look-btn:hover,
  .topbar .kn-look-btn[aria-expanded="true"] { opacity: 1; }

  .nav {
    display: flex;
    gap: 34px;
    font-size: 13px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 500;
  }
  .nav a { position: relative; padding: 4px 0; color: var(--kn-text); }
  .nav a::after {
    content: "";
    position: absolute; left: 0; bottom: 0;
    width: 100%; height: 1px;
    background: var(--kn-metal);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
  }
  .nav a:hover::after { transform: scaleX(1); }

  .menu-btn { display: none; background: none; border: 0; color: var(--kn-text); font: inherit; letter-spacing: 0.16em; text-transform: uppercase; cursor: pointer; }

  /* ---- Hero ---- */
  .hero {
    position: relative;
    min-height: min(88vh, 820px);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
  }
  .hero img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 42%;
  }
  .hero::after {
    content: "";
    position: absolute; inset: 0;
    /* Shade the bottom of the photo in the palette's deepest color so the
       title stays readable. The fade is drawn at full strength and the whole
       layer turned down, because a token can't carry its own transparency. */
    background: linear-gradient(to top, var(--kn-band) 0%, transparent 62%);
    opacity: 0.42;
  }
  .hero-inner {
    position: relative;
    z-index: 2;
    padding: var(--kn-edge);
    padding-bottom: clamp(34px, 6vw, 72px);
    color: var(--kn-on-photo);
    max-width: 900px;
  }
  /* Deep ink on the pale part of the photo, as the original forest green was. */
  .hero .eyebrow { color: var(--kn-band); opacity: 1; }
  .hero h1 {
    font-size: clamp(38px, 6.4vw, 88px);
    max-width: 15ch;
  }
  .hero h1 em { font-style: italic; font-weight: 400; }

  /* ---- Section frame ---- */
  .section { padding: clamp(64px, 10vw, 132px) var(--kn-edge); }
  /* When two sections sit back to back, their paddings would otherwise stack
     into an uneven-looking gap. Halve the join so the rhythm stays even. */
  .section + .section { padding-top: clamp(20px, 3vw, 40px); }
  .section-head { max-width: var(--kn-measure); }
  .section-head h2 { font-size: clamp(30px, 4.4vw, 52px); }
  .lead { color: var(--kn-muted); max-width: 46ch; margin: 16px 0 0; }

  /* ---- Eucalyptus hairline divider (the signature) ---- */
  .sprig { display: block; width: min(320px, 60%); margin: 6px auto 0; color: var(--kn-tint); }
  .sprig .stem { stroke: var(--kn-tint); }
  .sprig .seed { fill: var(--kn-metal); }

  /* ---- Featured grid ---- */
  .featured { text-align: center; }
  .featured .section-head { margin: 0 auto; }
  .grid3 {
    margin-top: clamp(36px, 5vw, 60px);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(14px, 2vw, 26px);
    text-align: left;
  }
  .tile figure { margin: 0; overflow: hidden; }
  .tile .frame { overflow: hidden; aspect-ratio: 3 / 4; }
  .tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(.2,.7,.2,1); }
  .tile:hover img { transform: scale(1.04); }
  .tile figcaption {
    margin-top: 14px;
    font-family: var(--kn-font-display);
    font-size: 21px;
    font-weight: 500;
    color: var(--kn-text);
  }
  .tile .meta { font-family: var(--kn-font-body); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--kn-tint); margin-top: 2px; }

  /* ---- Wide band ---- */
  .band { position: relative; min-height: min(56vh, 520px); display: grid; place-items: center; overflow: hidden; }
  .band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 58%; }
  .band::after { content: ""; position: absolute; inset: 0; background: var(--kn-band); opacity: 0.34; }
  .band p { position: relative; z-index: 2; color: var(--kn-on-photo); font-family: var(--kn-font-display); font-style: italic; font-weight: 400; font-size: clamp(30px, 5vw, 56px); text-align: center; max-width: 24ch; padding: 0 var(--kn-edge); }

  /* ---- Dark studio strip ---- */
  .studio { background: var(--kn-band); color: var(--kn-on-band); }
  .studio .wrap {
    padding: clamp(64px, 10vw, 132px) var(--kn-edge);
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: clamp(36px, 6vw, 90px);
    align-items: center;
  }
  .studio .eyebrow { color: var(--kn-metal-on-band, var(--kn-metal)); }
  .studio h2 { font-size: clamp(28px, 4vw, 46px); }
  .studio p { color: var(--kn-on-band-muted); max-width: 48ch; margin: 20px 0 0; }
  .studio figure { margin: 0; }
  .studio figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
  .rule { width: 46px; height: 1px; background: var(--kn-metal); margin: 26px 0 0; border: 0; }
  /* The studio strip stays dark in light mode, so it keeps the palette's bright metal. */
  .studio .rule { background: var(--kn-metal-on-band, var(--kn-metal)); }

  /* ---- Two-up detail ---- */
  .pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 2vw, 26px); margin-top: clamp(34px, 5vw, 56px); }
  .pair figure { margin: 0; }
  .pair img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
  .pair figcaption { margin-top: 12px; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--kn-tint); }

  /* ---- Contact ---- */
  .contact { text-align: center; }
  .contact .section-head { margin: 0 auto; }
  .contact h2 { font-size: clamp(30px, 4.6vw, 56px); }
  .cta {
    display: inline-block;
    margin-top: 30px;
    padding: 16px 40px;
    font-family: var(--kn-font-body);
    font-size: 13px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--kn-btn-fg);
    background: var(--kn-btn-bg);
    border: 1px solid var(--kn-btn-bg);
    transition: background 0.3s ease, color 0.3s ease;
  }
  .cta:hover { background: transparent; color: var(--kn-text); border-color: var(--kn-text); }

  /* ---- Footer ---- */
  footer { background: var(--kn-footer); color: var(--kn-on-footer); padding: clamp(48px, 7vw, 84px) var(--kn-edge); }
  .foot-top { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
  .foot-nav { display: flex; gap: 26px; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }
  .foot-line { position: relative; margin-top: 40px; padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; letter-spacing: 0.08em; }
  /* A hairline and quieter text in the footer's own text color. The footer
     is chrome (data-kn-chrome), so on a light page Design dresses it in the
     palette's dark roles and it reads exactly as it does in dark mode. */
  .foot-line::before { content: ""; position: absolute; top: 0; left: 0; right: 0; border-top: 1px solid currentColor; opacity: 0.28; }
  .foot-line > * { opacity: 0.82; }

  /* ---- Motion ---- */
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s ease, transform 0.9s ease; }
  .reveal.in { opacity: 1; transform: none; }

  @media (max-width: 860px) {
    .bar-right .nav { display: none; }
    .menu-btn { display: inline-block; }
    .studio .wrap { grid-template-columns: 1fr; }
    .studio figure { order: -1; }
  }
  @media (max-width: 620px) {
    .grid3 { grid-template-columns: 1fr; }
    .pair { grid-template-columns: 1fr; }
  }

  @media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .tile img { transition: none; }
  }

  /* ---- Accessibility ---- */
  .skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; }
  .skip-link:focus { left: var(--kn-edge); top: 10px; width: auto; height: auto; padding: 10px 16px; background: var(--kn-surface); color: var(--kn-text); border: 1px solid var(--kn-line); }
  .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

  /* ---- Page header (shared) ---- */
  .page-head { padding: clamp(74px, 12vw, 150px) var(--kn-edge) 0; max-width: 64ch; }
  .page-head h1 { font-family: var(--kn-font-display); font-weight: 500; line-height: 1.05; font-size: clamp(40px, 6.4vw, 84px); margin: 8px 0 0; }
  .page-head .lead { font-size: 19px; }
  .cat { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--kn-tint); font-weight: 600; }
  .meta { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--kn-metal); }

  /* ---- Prose (posts & pages) ---- */
  .page-body { padding: clamp(40px, 6vw, 80px) var(--kn-edge); }
  .prose { max-width: var(--kn-measure); font-size: 18px; line-height: 1.8; }
  .prose > * + * { margin-top: 1.4em; }
  .prose h2 { font-family: var(--kn-font-display); font-weight: 500; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.16; margin-top: 1.7em; }
  .prose h3 { font-family: var(--kn-font-display); font-weight: 600; font-size: 23px; margin-top: 1.5em; }
  .prose a:not(.cta) { color: var(--kn-text); border-bottom: 1px solid var(--kn-metal); }
  .prose ul, .prose ol { padding-left: 1.2em; }
  .prose li + li { margin-top: 0.5em; }
  .prose img { width: 100%; height: auto; margin: 2em 0; }
  .prose blockquote { margin: 1.8em 0; padding-left: 26px; border-left: 2px solid var(--kn-metal); font-family: var(--kn-font-display); font-style: italic; font-size: clamp(23px, 3vw, 32px); line-height: 1.35; }
  .prose figcaption { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--kn-tint); margin-top: 8px; }

  /* ---- Single post ---- */
  .post-hero-head { padding: clamp(74px, 12vw, 140px) var(--kn-edge) clamp(22px, 4vw, 38px); max-width: 62ch; }
  .post-hero-head h1 { font-family: var(--kn-font-display); font-weight: 500; font-size: clamp(38px, 6vw, 76px); line-height: 1.04; margin: 14px 0 0; }
  .post-hero-head .meta { margin-top: 18px; }
  .post-hero { margin: 0; }
  .post-hero img { width: 100%; max-height: 74vh; object-fit: cover; }
  .post-body { padding: clamp(44px, 7vw, 92px) var(--kn-edge); }
  .post-wrap { max-width: var(--kn-measure); margin: 0 auto; }
  .post-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 40px; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; }
  .post-nav a { color: var(--kn-tint); }

  /* ---- Post lists & archives ---- */
  .post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(22px, 3vw, 44px); }
  .post-card .shot { aspect-ratio: 3 / 2; overflow: hidden; background: var(--kn-surface); }
  .post-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(.2,.7,.2,1); }
  .post-card:hover img { transform: scale(1.04); }
  .post-card h3 { font-family: var(--kn-font-display); font-weight: 500; font-size: 23px; line-height: 1.2; margin: 15px 0 0; color: var(--kn-text); }
  .post-card .cat { display: block; margin: 15px 0 0; }
  .post-card .meta { margin-top: 8px; }
  .post-card p.ex { color: var(--kn-muted); font-size: 15px; margin: 8px 0 0; }
  .pagination { display: flex; align-items: center; justify-content: center; gap: clamp(20px, 4vw, 40px); margin-top: clamp(46px, 6vw, 78px); }
  .pagination a { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600; border-bottom: 1px solid var(--kn-metal); padding-bottom: 3px; color: var(--kn-text); }
  .pagination .pos { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--kn-muted); }

  /* ---- Search form & results ---- */
  .search-bar { display: flex; gap: 12px; margin-top: 24px; max-width: 520px; }
  .search-bar input { flex: 1; font: inherit; padding: 13px 15px; background: var(--kn-surface); color: var(--kn-text); border: 1px solid var(--kn-line); border-radius: 0; }
  .search-bar button { font: inherit; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; padding: 0 24px; background: var(--kn-btn-bg); color: var(--kn-btn-fg); border: 1px solid var(--kn-btn-bg); cursor: pointer; }
  .result-count { font-size: 13px; letter-spacing: 0.06em; color: var(--kn-muted); margin-top: 20px; }
  .results { list-style: none; margin: clamp(28px, 4vw, 46px) 0 0; padding: 0; }
  .result { border-top: 1px solid var(--kn-line); }
  .result:last-child { border-bottom: 1px solid var(--kn-line); }
  .result a { display: grid; grid-template-columns: 150px 1fr; gap: clamp(18px, 3vw, 36px); align-items: center; padding: clamp(20px, 3vw, 30px) 0; }
  .result.no-thumb a { grid-template-columns: 1fr; }
  .result .thumb { aspect-ratio: 3 / 2; overflow: hidden; }
  .result .thumb img { width: 100%; height: 100%; object-fit: cover; }
  .result h3 { font-family: var(--kn-font-display); font-weight: 500; font-size: clamp(22px, 3vw, 30px); line-height: 1.16; margin: 8px 0 0; color: var(--kn-text); }
  .result .ex { color: var(--kn-muted); font-size: 15px; margin: 8px 0 0; max-width: 58ch; }

  /* ---- 404 ---- */
  .error-page { min-height: 68vh; display: grid; place-items: center; padding: clamp(56px, 10vw, 110px) var(--kn-edge); text-align: center; }
  .error-inner { max-width: 46ch; }
  .error-inner h1 { font-family: var(--kn-font-display); font-weight: 500; font-size: clamp(38px, 6vw, 72px); line-height: 1.06; margin: 10px 0 0; }
  .error-inner .lead { margin: 18px auto 0; }
  .error-links { margin-top: 26px; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--kn-tint); }
  .error-links a { color: var(--kn-tint); }
  .error-links a:hover { color: var(--kn-text); }
  .error-page .sprig { margin: 32px auto 0; }
  .error-inner .search-bar { margin: 30px auto 0; }

  /* ---- Mobile menu ---- */
  .menu-panel { display: none; }
  @media (max-width: 860px) {
    .menu-panel[hidden] { display: none; }
    .menu-panel { display: block; position: fixed; inset: 0; z-index: 40; background: var(--kn-bg); padding: 96px var(--kn-edge) var(--kn-edge); }
    .menu-panel nav ul { display: flex; flex-direction: column; gap: 22px; }
    .menu-panel a { font-family: var(--kn-font-display); font-size: 30px; color: var(--kn-text); }
    .menu-close { position: absolute; top: 22px; right: var(--kn-edge); background: none; border: 0; color: var(--kn-text); font-size: 30px; line-height: 1; cursor: pointer; }
    .post-grid { grid-template-columns: repeat(2, 1fr); }
    .result a { grid-template-columns: 120px 1fr; }
  }
  @media (max-width: 560px) {
    .post-grid { grid-template-columns: 1fr; }
    .result a { grid-template-columns: 1fr; }
    .result .thumb { display: none; }
  }

  /* ---- Menu lists (WordPress markup) ---- */
  .nav ul, .menu-panel nav ul, .foot-nav ul { list-style: none; margin: 0; padding: 0; }
  .foot-nav ul { display: flex; gap: 26px; flex-wrap: wrap; }
  .nav ul { display: flex; gap: 34px; align-items: center; }
  .nav li, .menu-panel nav li { margin: 0; }

  /* Social links — footer row, only shows when set in the Customizer */
  .social-links { display: flex; gap: 20px; list-style: none; margin: 30px 0 0; padding: 0; }
  .social-link { display: inline-flex; color: var(--kn-metal); transition: color .15s ease, transform .15s ease; }
  .social-link svg { width: 22px; height: 22px; display: block; }
  .social-link:hover { color: var(--kn-text); transform: translateY(-1px); }
  .logo--on-color .social-link,
  footer .social-link { color: var(--kn-metal); }
  footer .social-link:hover { color: var(--on-dark, var(--kn-text)); }

  /* Uploaded logo (Customizer → Site Identity → Logo) sits in place of the mark */
  .custom-logo-link { display: inline-flex; align-items: center; }
  .custom-logo { display: block; height: 48px; width: auto; max-width: 240px; }
  /* The inline Knotful mark fills the logo-mark box. */
  .logo-mark .brandmark { display: block; width: 100%; height: 100%; }
