/*
 Theme Name:   Little Grins Child
 Theme URI:    https://littlegrinsphoto.com
 Description:  Child theme for Little Grins Photography by Sue. Parent: Kadence.
 Author:       Conrad
 Author URI:   https://littlegrinsphoto.com
 Template:     blocksy
 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:  little-grins-child
*/

/* ============================================================
   BRAND TOKENS
   All colour and typography values live here.
   Never hardcode hex values anywhere else in the project.
   ============================================================ */

:root {

  /* Colours */
  --cream:      #F5F0E8;
  --cream-deep: #EDE6D6;
  --rose:       #8A5A68;
  --brown:      #5C3D2E;
  --gold:       #C49A6C;
  --text:       #3D2B1F;
  --white:      #FFFFFF;

  /* Semantic aliases — use these in components */
  --color-bg:           var(--cream);
  --color-bg-alt:       var(--cream-deep);
  --color-heading:      var(--brown);
  --color-body:         var(--text);
  --color-cta:          var(--rose);
  --color-cta-hover:    #724855;
  --color-accent:       var(--gold);
  --color-border:       rgba(196, 154, 108, 0.3);

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Jost', system-ui, sans-serif;

  /* Font sizes — mobile-first base */
  --text-xs:   0.75rem;   /* 12px */
  --text-sm:   0.875rem;  /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg:   1.125rem;  /* 18px */
  --text-xl:   1.25rem;   /* 20px */
  --text-2xl:  1.5rem;    /* 24px */
  --text-3xl:  1.875rem;  /* 30px */
  --text-4xl:  2.25rem;   /* 36px */
  --text-5xl:  3rem;      /* 48px */
  --text-6xl:  3.75rem;   /* 60px */

  /* Spacing scale */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --container-max:    1200px;
  --container-narrow: 760px;
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-base: 200ms ease;
  --transition-slow: 400ms ease;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(60, 40, 20, 0.08);
  --shadow-md: 0 4px 16px rgba(60, 40, 20, 0.10);
  --shadow-lg: 0 8px 32px rgba(60, 40, 20, 0.12);
}


/* ============================================================
   RESET & BASE
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-body);
  background-color: var(--color-bg);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--rose);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover,
a:focus {
  color: var(--color-cta-hover);
}

a:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}


/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--color-heading);
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: var(--space-4);
}

/* Display headings only — min 22px mobile, 28px+ desktop */
h1 {
  font-size: var(--text-4xl);
  font-weight: 400;
  letter-spacing: -0.01em;
}

h2 {
  font-size: var(--text-3xl);
  font-weight: 500;
}

h3 {
  font-size: var(--text-2xl);
  font-weight: 500;
}

h4 {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

h5, h6 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
}

p {
  margin-top: 0;
  margin-bottom: var(--space-4);
  max-width: 65ch;
}

/* Allow full-width paragraphs inside containers that need it */
.prose-full p {
  max-width: none;
}

strong {
  font-weight: 500;
  color: var(--brown);
}

em {
  font-style: italic;
}

/* Responsive typography — desktop scale */
@media (min-width: 768px) {
  h1 { font-size: var(--text-5xl); }
  h2 { font-size: var(--text-4xl); }
  h3 { font-size: var(--text-3xl); }
}

@media (min-width: 1024px) {
  h1 { font-size: var(--text-6xl); }
  h2 { font-size: var(--text-5xl); }
}


/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: var(--space-16);
}

.section--lg {
  padding-block: var(--space-24);
}

@media (min-width: 768px) {
  .container {
    padding-inline: var(--space-8);
  }
  .section {
    padding-block: var(--space-20);
  }
}


/* ============================================================
   BUTTONS
   Semantic HTML: always use <a> or <button> — never <div>
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition-base),
              color var(--transition-base),
              border-color var(--transition-base),
              box-shadow var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
  min-height: 48px; /* Touch target */
}

/* Primary — rose fill */
.btn--primary {
  background-color: var(--rose);
  color: var(--white);
  border-color: var(--rose);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background-color: var(--color-cta-hover);
  border-color: var(--color-cta-hover);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

/* Secondary — outlined rose */
.btn--secondary {
  background-color: transparent;
  color: var(--rose);
  border-color: var(--rose);
}

.btn--secondary:hover,
.btn--secondary:focus-visible {
  background-color: var(--rose);
  color: var(--white);
}

/* Ghost — for dark/image backgrounds */
.btn--ghost {
  background-color: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background-color: var(--white);
  color: var(--rose);
}


/* ============================================================
   KADENCE OVERRIDES
   Minimal — only reset what conflicts with brand.
   ============================================================ */

/* Ensure Kadence doesn't override our font stack */
.kb-theme-font-body,
.entry-content {
  font-family: var(--font-body);
}

/* Reset Kadence link colours to ours */
.entry-content a {
  color: var(--rose);
}

/* Remove Kadence default button styles on our custom classes */
.btn.kb-button {
  all: unset;
  display: inline-flex;
}