/*
Theme Name: Nightingale
Theme URI: https://example.com/nightingale
Author: Christy Sechrist
Description: A WordPress block theme for a novelist publishing psychological drama, medical romance and paranormal romance. Palette, type and heading system all derive from the author wordmark: bold roman plus light italic, two colors. Cover-forward, commercial, and built around the pages an author site actually needs.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nightingale
Tags: block-theme, full-site-editing, blog, one-column
*/

:root{
  --ng-pad: clamp(1.25rem, 5vw, 5rem);
  --ng-gut: clamp(2rem, 5vw, 4.5rem);
  --ng-hair: rgba(33,29,38,.14);
}

body{
  font-optical-sizing:auto;
  overflow-x:hidden;
  /* paper grain. Flat fills are what make a light layout read as template. */
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------
   THE HEADING SYSTEM
   The wordmark is bold roman plus light italic in a second color.
   Every heading on the site repeats that construction, so the logo
   is not sitting on top of the design, it is the design.
   Italicise the second half of a heading in the editor and it picks
   up garnet automatically.
   ------------------------------------------------------------ */
h1 em, h2 em, h3 em,
.wp-block-post-title em,
.ng-swash{
  font-style:italic;
  font-weight:400;
  color:var(--wp--preset--color--garnet);
}

.ng-eyebrow,
.wp-block-post-date,
.wp-block-post-terms{
  font-family:var(--wp--preset--font-family--ui);
  font-size:var(--wp--preset--font-size--eyebrow);
  font-weight:500;
  letter-spacing:.3em;
  text-transform:uppercase;
  color:var(--wp--preset--color--slate);
}
.ng-logline{
  font-family:var(--wp--preset--font-family--ui);
  font-weight:400;
  font-size:var(--wp--preset--font-size--logline);
  line-height:1.5;
  max-width:36ch;
  color:var(--wp--preset--color--slate);
}

/* the one repeated ornament: a double hairline */
.ng-rule{
  border:0; height:3px; margin:0;
  background:linear-gradient(var(--ng-hair),var(--ng-hair)) top/100% 1px no-repeat,
             linear-gradient(var(--ng-hair),var(--ng-hair)) bottom/100% 1px no-repeat;
}

/* ------------------------------------------------------------
   Masthead: the wordmark is the identity, centred and large
   ------------------------------------------------------------ */
.ng-util{ background:var(--wp--preset--color--ink); color:var(--wp--preset--color--cream) }
.ng-util a,
.ng-util .wp-block-navigation-item__content{
  font-family:var(--wp--preset--font-family--ui);
  font-size:.66rem; font-weight:500; letter-spacing:.2em; text-transform:uppercase;
  color:rgba(246,240,236,.72); text-decoration:none;
}
.ng-util a:hover, .ng-util a:focus-visible{ color:var(--wp--preset--color--rose) }

.ng-masthead{ text-align:center; padding-block:clamp(2rem,5vw,3.4rem) clamp(1.25rem,3vw,2rem) }
.ng-masthead img,
.ng-masthead .custom-logo{ width:min(560px,86vw); margin-inline:auto; height:auto }

.ng-mainnav .wp-block-navigation__container{ justify-content:center }
.ng-mainnav .wp-block-navigation-item__content{
  font-family:var(--wp--preset--font-family--ui);
  font-size:.72rem; font-weight:500; letter-spacing:.22em; text-transform:uppercase;
  color:var(--wp--preset--color--ink); text-decoration:none;
  padding-block:.4rem; border-bottom:2px solid transparent;
}
.ng-mainnav .wp-block-navigation-item__content:hover,
.ng-mainnav .wp-block-navigation-item__content:focus-visible{
  border-color:var(--wp--preset--color--garnet);
  color:var(--wp--preset--color--garnet);
}

/* ------------------------------------------------------------
   Hero: the new release, merchandised. The cover sits proud of
   the band and overlaps the section below it.
   ------------------------------------------------------------ */
.ng-hero{ background:var(--wp--preset--color--cream); position:relative }
.ng-hero::before{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(100deg, rgba(224,120,138,.1), transparent 55%);
}
.ng-hero > *{ position:relative }
.ng-hero h1,
.ng-hero .wp-block-post-title{ max-width:19ch; text-wrap:balance }
.ng-hero__cover{ margin-bottom:clamp(-5rem,-6vw,-3rem); z-index:3; position:relative }
.ng-hero__cover img{ box-shadow:0 26px 54px -20px rgba(33,29,38,.55) }
.ng-hero__series{
  font-family:var(--wp--preset--font-family--ui);
  font-size:.78rem; color:var(--wp--preset--color--slate);
}

/* ------------------------------------------------------------
   Genre filter: the wordmark tagline made structural
   ------------------------------------------------------------ */
.ng-genretabs{ display:flex; flex-wrap:wrap; gap:.5rem; margin-bottom:2.2rem; padding:0; list-style:none }
.ng-genretabs a{
  display:inline-block; text-decoration:none;
  font-family:var(--wp--preset--font-family--ui);
  font-size:.66rem; font-weight:600; letter-spacing:.18em; text-transform:uppercase;
  padding:.55rem .95rem; color:var(--ng-c,var(--wp--preset--color--ink));
  border:1.5px solid currentColor; transition:background-color .2s, color .2s;
}
.ng-genretabs a:hover,
.ng-genretabs a:focus-visible,
.ng-genretabs a[aria-current="page"]{ background:currentColor }
.ng-genretabs a:hover span,
.ng-genretabs a:focus-visible span,
.ng-genretabs a[aria-current="page"] span{ color:var(--wp--preset--color--paper) }

/* ------------------------------------------------------------
   Shelf: covers, the way a reader scans a shelf
   ------------------------------------------------------------ */
.ng-shelf .wp-block-post{ transition:transform .25s }
.ng-shelf .wp-block-post:hover{ transform:translateY(-7px) }
.ng-shelf .wp-block-post-featured-image img{ box-shadow:0 16px 34px -18px rgba(33,29,38,.5) }
.ng-shelf .wp-block-post-terms,
.ng-shelf .wp-block-post-date{
  font-size:.64rem; letter-spacing:.16em; margin-top:.75rem;
  padding-left:.55rem; border-left:2px solid var(--ng-accent,var(--wp--preset--color--mauve));
}

/* ------------------------------------------------------------
   Promo band: a second title in play
   ------------------------------------------------------------ */
.ng-promo{
  background:var(--ng-band, var(--wp--preset--color--ink));
  color:var(--ng-band-fg, var(--wp--preset--color--cream));
}
.ng-promo h2, .ng-promo .wp-block-post-title{ color:inherit }
.ng-promo h2 em{ color:var(--wp--preset--color--rose) }
.ng-promo .ng-logline, .ng-promo .ng-eyebrow{ color:inherit; opacity:.84 }
.ng-promo .wp-block-button.is-style-outline .wp-block-button__link{
  color:inherit; border-color:currentColor; background:transparent;
}

/* ------------------------------------------------------------
   About
   ------------------------------------------------------------ */
.ng-portrait{ position:relative }
.ng-portrait::after{ content:""; position:absolute; inset:.6rem; border:1px solid rgba(255,255,255,.5); pointer-events:none }
.ng-bigline{
  font-family:var(--wp--preset--font-family--display);
  font-weight:700; font-size:clamp(1.35rem,1.1rem + 1.1vw,1.95rem);
  line-height:1.24;
}
.ng-creds{ display:flex; flex-wrap:wrap; gap:.5rem; margin:1.5rem 0 0; padding:0; list-style:none }
.ng-creds li{
  font-family:var(--wp--preset--font-family--ui);
  font-size:.64rem; font-weight:600; letter-spacing:.14em; text-transform:uppercase;
  border:1px solid var(--ng-hair); padding:.5rem .85rem;
  color:var(--wp--preset--color--slate);
}

/* ------------------------------------------------------------
   Newsletter with reader magnet
   ------------------------------------------------------------ */
.ng-signup{
  background:var(--wp--preset--color--ink);
  color:var(--wp--preset--color--cream);
  position:relative; overflow:hidden;
}
.ng-signup::before{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(60% 110% at 82% 20%, rgba(224,120,138,.26), transparent 62%);
}
.ng-signup > *{ position:relative }
.ng-signup h2{ color:inherit }
.ng-signup h2 em{ color:var(--wp--preset--color--rose) }
.ng-signup p{ color:rgba(246,240,236,.82) }
.ng-signup .ng-eyebrow{ color:var(--wp--preset--color--rose) }
.ng-signup form{ display:flex; flex-wrap:wrap; gap:.7rem; margin-top:1.6rem }
.ng-signup input[type="email"]{
  flex:1 1 15rem; background:transparent; color:var(--wp--preset--color--cream);
  border:1.5px solid rgba(246,240,236,.4); padding:1rem 1.1rem;
  font-family:var(--wp--preset--font-family--ui); font-size:.95rem;
}
.ng-signup input::placeholder{ color:rgba(246,240,236,.5) }
.ng-signup .ng-fineprint{
  font-family:var(--wp--preset--font-family--ui); font-size:.72rem;
  color:rgba(246,240,236,.55); margin-top:1rem;
}
.ng-magnet{ position:relative }
.ng-magnet img{ transform:rotate(-3deg); box-shadow:0 26px 54px -20px rgba(0,0,0,.6) }
.ng-magnet .ng-flag{
  position:absolute; top:-.7rem; left:50%; transform:translateX(-50%) rotate(-3deg);
  background:var(--wp--preset--color--rose); color:var(--wp--preset--color--ink); z-index:2;
  font-family:var(--wp--preset--font-family--ui);
  font-size:.6rem; font-weight:700; letter-spacing:.2em; text-transform:uppercase;
  padding:.4rem .8rem; white-space:nowrap;
}

/* ------------------------------------------------------------
   Book page: formats, reviews, retailers
   ------------------------------------------------------------ */
.ng-formats{ display:flex; flex-wrap:wrap; gap:.5rem; margin:1.4rem 0 0; padding:0; list-style:none }
.ng-formats li{
  font-family:var(--wp--preset--font-family--ui);
  font-size:.64rem; font-weight:600; letter-spacing:.16em; text-transform:uppercase;
  border:1px solid currentColor; padding:.45rem .8rem; opacity:.85;
}
.ng-retailers{ display:flex; flex-wrap:wrap; gap:.85rem; margin:1.9rem 0 0; padding:0; list-style:none }
.ng-retailers a{
  display:inline-block; text-decoration:none; color:inherit;
  font-family:var(--wp--preset--font-family--ui);
  font-size:.74rem; font-weight:600; letter-spacing:.2em; text-transform:uppercase;
  padding:1.05rem 2.1rem; border:1.5px solid currentColor;
  transition:background-color .2s, color .2s, transform .2s;
}
.ng-retailers a:hover, .ng-retailers a:focus-visible{ transform:translateY(-2px); background:currentColor }
.ng-retailers a:hover span, .ng-retailers a:focus-visible span{ color:var(--wp--preset--color--cream) }

.ng-reviews{ display:grid; gap:1.75rem; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)) }
.ng-review{ border-top:2px solid var(--wp--preset--color--garnet); padding-top:1.2rem }
.ng-review blockquote{
  margin:0 0 .8rem; border:0; padding:0;
  font-family:var(--wp--preset--font-family--display);
  font-size:1.26rem; line-height:1.32;
}
.ng-review cite{
  font-style:normal; font-family:var(--wp--preset--font-family--ui);
  font-size:.66rem; font-weight:600; letter-spacing:.18em; text-transform:uppercase;
  color:var(--wp--preset--color--slate);
}

/* ------------------------------------------------------------
   Events
   ------------------------------------------------------------ */
.ng-event{
  display:grid; gap:.3rem 1.75rem; align-items:baseline;
  grid-template-columns:6.5rem minmax(0,1fr) auto;
  padding-block:1.3rem; border-bottom:1px solid var(--ng-hair);
}
.ng-event:first-of-type{ border-top:1px solid var(--ng-hair) }
.ng-event__date{
  font-family:var(--wp--preset--font-family--ui);
  font-weight:600; font-size:.78rem; letter-spacing:.12em; text-transform:uppercase;
  color:var(--wp--preset--color--garnet);
}
.ng-event__what{ font-family:var(--wp--preset--font-family--display); font-weight:700; font-size:1.22rem }
.ng-event__where{ grid-column:2; color:var(--wp--preset--color--slate); font-size:.93rem }

/* ------------------------------------------------------------
   Free reads
   ------------------------------------------------------------ */
.ng-story{
  display:grid; gap:.3rem 1.75rem; align-items:baseline;
  grid-template-columns:minmax(0,1fr) auto;
  padding-block:1.35rem; border-bottom:1px solid var(--ng-hair);
  transition:padding-left .28s ease;
}
.ng-story:hover{ padding-left:.8rem }
.ng-story__title a{ text-decoration:none; color:inherit; transition:color .2s }
.ng-story:hover .ng-story__title a{ color:var(--wp--preset--color--garnet) }
.ng-story__len{ grid-column:2; grid-row:1/3; align-self:center }

/* ------------------------------------------------------------
   Press kit, contact
   ------------------------------------------------------------ */
.ng-press .wp-block-post,
.ng-presscard{
  background:#fff; border:1px solid var(--ng-hair); padding:1.4rem 1.25rem;
  transition:border-color .2s, transform .2s;
}
.ng-press .wp-block-post:hover,
.ng-presscard:hover{ border-color:var(--wp--preset--color--garnet); transform:translateY(-4px) }

.ng-field{ display:block; margin-bottom:1rem }
.ng-field > span{
  display:block; font-family:var(--wp--preset--font-family--ui);
  font-size:.66rem; font-weight:600; letter-spacing:.18em; text-transform:uppercase;
  color:var(--wp--preset--color--slate); margin-bottom:.45rem;
}
.ng-field input, .ng-field textarea, .ng-field select{
  width:100%; background:#fff; border:1px solid var(--ng-hair);
  padding:.85rem .95rem; font-family:var(--wp--preset--font-family--ui);
  font-size:.95rem; color:var(--wp--preset--color--ink);
}
.ng-field textarea{ min-height:8rem; resize:vertical }
.ng-formnote{ font-family:var(--wp--preset--font-family--ui); font-size:.8rem; color:var(--wp--preset--color--slate) }
.ng-formnote--ok{ color:var(--wp--preset--color--garnet); font-weight:600 }
.ng-reps{ background:var(--wp--preset--color--cream); padding:1.75rem 1.6rem }
.ng-reps dt{
  font-family:var(--wp--preset--font-family--ui);
  font-size:.64rem; font-weight:600; letter-spacing:.18em; text-transform:uppercase;
  color:var(--wp--preset--color--garnet); margin-top:1.1rem;
}
.ng-reps dt:first-of-type{ margin-top:0 }
.ng-reps dd{ margin:.3rem 0 0; font-size:.95rem }

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.ng-foot{ background:var(--wp--preset--color--ink); color:var(--wp--preset--color--cream) }
.ng-foot img{ width:min(270px,70vw); height:auto }
.ng-foot a{ color:var(--wp--preset--color--cream); text-decoration:none; font-family:var(--wp--preset--font-family--ui); font-size:.88rem }
.ng-foot a:hover, .ng-foot a:focus-visible{ color:var(--wp--preset--color--rose) }
.ng-foot .ng-eyebrow{ color:var(--wp--preset--color--rose) }
.ng-foot__base{
  border-top:1px solid rgba(246,240,236,.14);
  font-family:var(--wp--preset--font-family--ui);
  font-size:.72rem; color:rgba(246,240,236,.55);
}

/* ------------------------------------------------------------
   Reading pages: free reads, excerpts, blog
   ------------------------------------------------------------ */
.ng-reading .wp-block-post-content{ max-width:34rem; margin-inline:auto }
.ng-reading .wp-block-post-content > p{ font-size:1.14rem; line-height:1.82 }
.ng-reading .wp-block-post-content > p:first-of-type::first-letter{
  font-family:var(--wp--preset--font-family--display);
  float:left; font-size:3.8em; line-height:.82;
  padding:.04em .1em 0 0; font-weight:700;
  color:var(--wp--preset--color--garnet);
}
.ng-progress{
  position:fixed; inset:0 auto auto 0; height:2px; width:0; z-index:50;
  background:var(--wp--preset--color--garnet);
}

/* ------------------------------------------------------------
   Quality floor
   ------------------------------------------------------------ */
:focus-visible{ outline:2px solid var(--wp--preset--color--garnet); outline-offset:3px }
.screen-reader-text{
  position:absolute !important; width:1px; height:1px;
  overflow:hidden; clip-path:inset(50%); white-space:nowrap;
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{ transition-duration:.01ms !important; animation:none !important }
}
@media (max-width:900px){
  .ng-hero__cover{ margin-bottom:0 }
  .ng-event{ grid-template-columns:1fr }
  .ng-event__where{ grid-column:1 }
}
@media (max-width:640px){
  .ng-story{ grid-template-columns:1fr }
  .ng-story__len{ grid-column:1; grid-row:auto }
}
