/*
Theme Name: sgamage
Theme URI: https://example.com/sgamage
Author: Your Name
Author URI: https://example.com
Description: A bold portfolio-style WordPress theme implementation based on a custom HTML design.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
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: sgamage
Tags: blog, portfolio, custom-logo, translation-ready
*/

:root {
  --sg-bg: #f5f4f0;
  --sg-text: #1a1a1a;
  --sg-muted: #606060;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background-color: var(--sg-bg);
  color: var(--sg-text);
  overflow-x: hidden;
  line-height: 1.45;
}

a {
  color: #1a1a1a;
  text-decoration: none;
}

a:visited {
  color: #1a1a1a;
}

a:hover {
  opacity: 0.9;
}

a:focus-visible {
  opacity: 0.9;
  outline: 2px solid #1a1a1a;
  outline-offset: 2px;
}

*:focus {
  outline-color: #1a1a1a;
}

/* Kill Tailwind's default blue ring */
*, *::before, *::after {
  --tw-ring-color: #1a1a1a;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 1000;
  padding: 0.5rem 0.75rem;
  background: #000;
  color: #fff;
}

.hero-title {
  font-weight: 900;
  letter-spacing: -0.065em;
  line-height: 0.86;
  word-break: break-word;
}

.body-tight {
  letter-spacing: -0.05em;
  line-height: 1.02;
}

.text-case-title {
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.9;
  word-break: break-word;
}

.text-muted {
  color: var(--sg-muted);
}

@keyframes marquee {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

.animate-marquee {
  animation: marquee 25s linear infinite;
}

@keyframes sg-fade-up {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes sg-arrow-float {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-4px) rotate(-5deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

.sg-reveal {
  opacity: 0;
  animation: sg-fade-up 700ms ease forwards;
}

.sg-delay-1 {
  animation-delay: 120ms;
}

.sg-delay-2 {
  animation-delay: 220ms;
}

.sg-delay-3 {
  animation-delay: 320ms;
}

.sg-delay-4 {
  animation-delay: 420ms;
}

.sg-arrow-float {
  animation: sg-arrow-float 2.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .sg-reveal,
  .sg-arrow-float,
  .animate-marquee {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

.sgamage-desktop-menu,
.sgamage-mobile-menu,
.sgamage-desktop-menu ul,
.sgamage-mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sgamage-desktop-menu a,
.sgamage-mobile-menu a {
  text-decoration: none;
}

.sgamage-mobile-menu a {
  display: block;
  padding: 0.3rem 0;
  color: #f5f4f0;
}

.sgamage-mobile-menu a:visited {
  color: #f5f4f0;
}

.sgamage-mobile-menu a:hover,
.sgamage-mobile-menu a:focus-visible {
  color: #ffffff;
}

.sgamage-mobile-menu .sub-menu {
  margin-top: 0.25rem;
  margin-left: 0.85rem;
  padding-left: 0.75rem;
  border-left: 1px solid rgba(245, 244, 240, 0.35);
}

.emoji {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.08em;
}

.wp-main-content {
  min-height: 40vh;
}

.entry-content img,
.entry-content iframe,
.entry-content video {
  max-width: 100%;
  height: auto;
}

.entry-content a {
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.2rem;
}

.comments-area {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #1a1a1a;
}

.search-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.search-field {
  border: 1px solid #1a1a1a;
  padding: 0.5rem 0.75rem;
  border-radius: 9999px;
  min-width: 240px;
}

.search-submit {
  border: 1px solid #1a1a1a;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: #1a1a1a;
  color: #f5f4f0;
  cursor: pointer;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  clip: auto !important;
  clip-path: none;
  height: auto;
  width: auto;
  display: block;
  z-index: 100000;
  background: #000;
  color: #fff;
  padding: 0.5rem 0.75rem;
}

@media (max-width: 767px) {
  .hero-title {
    font-size: clamp(2.2rem, 15vw, 4.2rem) !important;
    line-height: 0.95;
    letter-spacing: -0.045em;
  }

  .body-tight {
    font-size: clamp(1.55rem, 8.8vw, 2.35rem) !important;
    line-height: 1.06;
  }

  .text-case-title {
    font-size: clamp(2rem, 12vw, 3.15rem) !important;
    line-height: 0.98;
  }

  .wp-main-content .max-w-\[1400px\] {
    width: 100%;
  }

  .wp-main-content .min-h-\[320px\] {
    min-height: 0;
  }

  .sgamage-mobile-menu {
    max-height: min(65vh, 32rem);
    overflow: auto;
  }
}
